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 22 public class closestatement implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, SQLdatastatement, _Executer { 23 24 public cursorname _cursorname0; 25 public SRESERVEDWORD1206543922 _SRESERVEDWORD12065439221; 26 27 _ServerSession currentSession; 28 public Object run(Object object) throws DException { 29 _StatementExecutionContext sec = (_StatementExecutionContext) object; 30 currentSession = sec.getServerSession(); 31 String cName = (String ) _cursorname0.run(null); 32 _Cursor cursor = (_Cursor) currentSession.getCursor(cName); 33 if (!cursor.getCursorState()) { 34 throw new DException("DSE8040", new Object [] {cName}); 35 } 36 return this; 37 } 38 39 public String toString() { 40 StringBuffer clause = new StringBuffer (); 41 clause.append(" "); 42 clause.append(_SRESERVEDWORD12065439221.toString()); 43 clause.append(" "); 44 clause.append(_cursorname0.toString()); 45 return clause.toString().trim(); 46 } 47 48 54 public Object execute(_VariableValues parm1) throws DException { 55 _Cursor cursor = (_Cursor) currentSession.getCursor( (String ) _cursorname0. 56 run(null)); 57 if (!cursor.getCursorState()) { 58 throw new DException("DSE1261", null); 59 } 60 cursor.close(); 61 ( (ServerSession) currentSession).removeCursor( (String ) _cursorname0.run(null)); 62 return "Cursor successfully closed"; 63 } 64 65 public Object execute(Object [] parm1) throws DException { 66 67 throw new java.lang.UnsupportedOperationException ("Method execute() not yet implemented."); 68 } 69 70 public Object [] getParameters(Object parm1) throws DException { 71 return null; 72 } 73 74 public Object executeForFresh(Object [] obj) throws DException { 75 throw new java.lang.UnsupportedOperationException ("Method executeForFresh not yet implemented."); 76 } 77 78 public _Reference[] checkSemantic(_ServerSession serverSession) throws DException { 79 return _cursorname0.getReferences(new TableDetails[0]); 80 } 81 82 public _Reference[] getReferences() throws DException { 83 return null; 84 } 85 86 public Object clone() throws CloneNotSupportedException { 87 return this; 88 } 89 } 90 | Popular Tags |