1 package com.daffodilwoods.daffodildb.server.sql99.dml; 2 3 import com.daffodilwoods.daffodildb.server.serversystem.*; 4 import com.daffodilwoods.daffodildb.server.sql99.*; 5 import com.daffodilwoods.daffodildb.server.sql99.common.*; 6 import com.daffodilwoods.daffodildb.server.sql99.dml.declarecursor.*; 7 import com.daffodilwoods.daffodildb.server.sql99.token.*; 8 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 9 import com.daffodilwoods.database.resource.*; 10 11 20 public class openstatement implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, 21 SQLdatastatement, _Executer { 22 23 public cursorname _cursorname0; 24 public SRESERVEDWORD1206543922 _SRESERVEDWORD12065439221; 25 26 private _Cursor cursor = null; 27 private _ServerSession currentSession; 28 29 35 public _Reference[] checkSemantic(_ServerSession serverSession) throws 36 DException { 37 return _cursorname0.getReferences(new TableDetails[0]); 38 } 39 40 46 public Object run(Object object) throws DException { 47 _StatementExecutionContext sec = (_StatementExecutionContext) object; 48 currentSession = sec.getServerSession(); 49 String Cname = (String ) _cursorname0.run(null); 50 cursor = (_Cursor) currentSession.getCursor(Cname); 51 if (cursor.getCursorState()) { 52 throw new DException("DSE1261", new Object [] {Cname}); 53 } 54 cursor.setCursorState(true); 55 return this; 56 } 57 58 public Object execute(_VariableValues vv1) throws DException { 59 cursor.setCursorState(true); 60 return "Cursor opened successfully"; 61 } 62 63 public Object execute(Object [] obj) throws DException { 64 throw new RuntimeException ( 65 " Method execute with Object Array not Valid in Cursor open statement "); 66 } 67 68 public String toString() { 69 StringBuffer clause = new StringBuffer (); 70 clause.append(" "); 71 if(_SRESERVEDWORD12065439221!=null) 72 clause.append(_SRESERVEDWORD12065439221.toString()); 73 clause.append(" "); 74 clause.append(_cursorname0.toString()); 75 return clause.toString().trim(); 76 } 77 78 public Object [] getParameters(Object parm1) throws DException { 79 return null; 80 } 81 82 public Object executeForFresh(Object [] obj) throws DException { 83 throw new java.lang.UnsupportedOperationException ( 84 "Method executeForFresh not yet implemented."); 85 } 86 87 public _Reference[] getReferences() throws DException { 88 return null; 89 } 90 91 public Object clone() throws CloneNotSupportedException { 92 return this; 93 } 94 } 95 | Popular Tags |