1 package com.daffodilwoods.daffodildb.server.sql99.token; 2 3 import java.util.*; 4 5 import com.daffodilwoods.daffodildb.server.sql99.common.*; 6 import com.daffodilwoods.daffodildb.server.sql99.expression.*; 7 import com.daffodilwoods.daffodildb.server.sql99.expression.expressionprimary.*; 8 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 9 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 10 import com.daffodilwoods.database.resource.*; 11 12 public class variablecolumn extends AbstractValueExpression implements unsignedliteral, Datatypes, SQLspecialcharacter, SQLspecialcharacter2, _Reference, SimpleConstants { 13 public Squestionmark_1088734521 _variablecolumn0; 14 String reason; 15 int index = -1; 16 int dataType = -1; 17 int size; 18 ColumnDetails column; 19 20 public _Reference[] getReferences(TableDetails[] tableDetails) throws DException { 21 return new _Reference[] {this}; 22 } 23 24 public int getCardinality() throws DException { 25 return -1; 26 } 27 28 public variablecolumn() { 29 } 30 31 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 32 try { 33 return ( (_VariableValues) object).getColumnValues(this); 34 } catch (NullPointerException npe) { 35 throw new DException("DSE3804", null); 36 } 37 } 38 39 public ColumnDetails[] getColumnDetails() throws DException { 40 ColumnDetails column = new ColumnDetails(); 41 column.setColumn(new String [] {"?"}); 42 column.setType(CONSTANT); 43 column.setQuestion(); 44 this.column = column; 45 return new ColumnDetails[] {column}; 46 } 47 48 public final Object [] getParameters(Object object) throws DException { 49 return new Object [] {this}; 50 } 51 52 public ParameterInfo[] getParameterInfo() throws DException { 53 ParameterInfo parameterInfo = new ParameterInfo(); 54 parameterInfo.setQuestionMark(true); 55 return new ParameterInfo[] {parameterInfo}; 56 } 57 58 public int getType() { 59 return OTHERS; 60 } 61 62 public String getColumn() throws DException { 63 64 throw new java.lang.UnsupportedOperationException ("Method getColumn() not yet implemented."); 65 } 66 67 public int getIndex() throws DException { 68 if (index == -1) { 69 throw new DException("DSE565", null); 70 } 71 return index; 72 } 73 74 public void setIndex(int index0) throws DException { 75 index = index0; 76 } 77 78 public int getReferenceType() throws DException { 79 return VARIABLECOLUMN; 80 } 81 82 public com.daffodilwoods.daffodildb.server.sql99.utils._Reference[] checkSemantic(com.daffodilwoods.daffodildb.server.serversystem._ServerSession object) throws DException { 83 return new _Reference[] {this}; 84 } 85 86 public String getQualifiedColumnName() throws DException { 87 88 throw new java.lang.UnsupportedOperationException ("Method getQualifiedColumnName() not yet implemented."); 89 } 90 91 public String getTriggerTableAlias() throws DException { 92 throw new java.lang.UnsupportedOperationException ("Method getTriggerTableAlias() not yet implemented."); 93 } 94 95 public int getDatatype() throws DException { 96 if (dataType == -1) { 97 if (column == null) { 98 getColumnDetails(); 99 } 100 dataType = column.getDatatype(); 101 } 102 return dataType; 103 } 104 105 public void setSize(int size0) throws DException { 106 size = size0; 107 } 108 109 public int getSize() throws DException { 110 return size; 111 } 112 113 114 public AbstractRowValueExpression[] getChilds() { 115 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 116 return childs; 117 } 118 119 public String toString() { 120 StringBuffer sb = new StringBuffer (); 121 sb.append(" "); 122 sb.append(_variablecolumn0); 123 return sb.toString(); 124 } 125 126 public Object clone() throws CloneNotSupportedException { 127 isCloned=false; 128 return this; 129 } 130 131 public void getColumnsIncluded(ArrayList aList) throws DException { 132 } 133 134 public void getTablesIncluded(ArrayList aList) throws DException { 135 } 136 137 public ByteComparison getByteComparison(Object object) throws DException { 138 ByteComparison b = new ByteComparison(true, new int[] { -1}); 139 if (object instanceof _VariableValues) { 140 b.setField(new Object [] { ( (_VariableValues) object).getColumnValues(this)}); 141 } 142 return b; 143 } 144 145 public void releaseResource() throws DException { 146 147 } 148 149 public void setDatatype(int type) throws DException { 150 dataType = type; 151 } 152 public void setReason(String reason0) throws DException { 153 reason = reason0; 154 } 155 156 public String getReason() throws DException { 157 return reason; 158 } 159 160 161 162 boolean isCloned; 163 public boolean isCloned(){ 164 return isCloned; 165 } 166 public void setCloned(boolean isCloned0){ 167 isCloned=isCloned0; 168 } 169 170 } 171 | Popular Tags |