1 package com.daffodilwoods.daffodildb.server.sql99.expression.expressionprimary; 2 3 import java.util.*; 4 5 import com.daffodilwoods.daffodildb.server.serversystem.*; 6 import com.daffodilwoods.daffodildb.server.sql99.common.*; 7 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 8 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 9 import com.daffodilwoods.database.resource.*; 10 11 public class SQLargumentlist extends AbstractRowValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter { 12 private boolean parametersCalculated = false; 13 private Object [] parameters; 14 15 public SQLargumentOptRepScomma94843605SQLargument 16 _OptSQLargumentOptRepScomma94843605SQLargument0; 17 18 public Object run(Object object) throws DException { 19 if (_OptSQLargumentOptRepScomma94843605SQLargument0 == null) { 20 return null; 21 } 22 return _OptSQLargumentOptRepScomma94843605SQLargument0.run(object); 23 } 24 25 public boolean isArguementListEmpty() throws DException { 26 return _OptSQLargumentOptRepScomma94843605SQLargument0 == null; 27 } 28 29 public int getNumberOfParametersInArgumentList() { 30 return _OptSQLargumentOptRepScomma94843605SQLargument0 == null 31 ? 0 : 32 _OptSQLargumentOptRepScomma94843605SQLargument0.getNumberOfParametersInArgumentList(); 33 } 34 35 public ArrayList getSqlArguments() throws DException { 36 return _OptSQLargumentOptRepScomma94843605SQLargument0.getSqlArguments(); 37 } 38 39 public Object [] getParametersWithIndexes() throws DException { 40 initialiseParameters(); 41 return parameters; 42 } 43 44 private void initialiseParameters() throws DException { 45 if (parametersCalculated == false) { 46 ArrayList param = _OptSQLargumentOptRepScomma94843605SQLargument0 == null 47 ? null : _OptSQLargumentOptRepScomma94843605SQLargument0.getParamtersForParameterInfo(); 48 parameters = param == null || param.size() == 0 ? null : param.toArray(); 49 parametersCalculated = true; 50 } 51 } 52 53 public _Reference[] getParameterReferences() throws DException { 54 if (_OptSQLargumentOptRepScomma94843605SQLargument0 == null) { 55 return null; 56 } 57 return _OptSQLargumentOptRepScomma94843605SQLargument0. 58 getParameterReferences(); 59 } 60 61 public AbstractRowValueExpression[] getChilds() { 62 if (_OptSQLargumentOptRepScomma94843605SQLargument0 != null) { 63 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {_OptSQLargumentOptRepScomma94843605SQLargument0}; 64 return childs; 65 } 66 return null; 67 } 68 69 public _Reference[] checkSemantic(_ServerSession object) throws DException { 70 return _OptSQLargumentOptRepScomma94843605SQLargument0 != null 71 ? _OptSQLargumentOptRepScomma94843605SQLargument0.checkSemantic(object) 72 : null; 73 } 74 75 public ParameterInfo[] getThisParameterInfo() throws DException { 76 return null; 77 } 78 79 public String toString() { 80 StringBuffer sb = new StringBuffer (); 81 sb.append(" "); 82 sb.append("("); 83 sb.append(" "); 84 if (_OptSQLargumentOptRepScomma94843605SQLargument0 != null) { 85 sb.append(_OptSQLargumentOptRepScomma94843605SQLargument0); 86 } 87 sb.append(" "); 88 sb.append(")"); 89 return sb.toString(); 90 } 91 92 public Object clone() throws CloneNotSupportedException { 93 SQLargumentlist tempClass = new SQLargumentlist(); 94 if (_OptSQLargumentOptRepScomma94843605SQLargument0 != null) { 95 tempClass._OptSQLargumentOptRepScomma94843605SQLargument0 = ( 96 SQLargumentOptRepScomma94843605SQLargument) 97 _OptSQLargumentOptRepScomma94843605SQLargument0.clone(); 98 } 99 return tempClass; 100 } 101 102 public ColumnDetails[] getChildColumnDetails() throws DException { 103 return null; 104 } 105 106 public ColumnDetails[] getColumnDetails() throws DException { 107 if (_OptSQLargumentOptRepScomma94843605SQLargument0 != null) { 108 return _OptSQLargumentOptRepScomma94843605SQLargument0.getColumnDetails(); 109 } 110 return new ColumnDetails[0]; 111 } 112 } 113 | Popular Tags |