1 package com.daffodilwoods.daffodildb.server.sql99.token; 2 3 import java.math.*; 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.rowvalueexpression.*; 8 import com.daffodilwoods.daffodildb.server.sql99.utils.*; 9 import com.daffodilwoods.daffodildb.utils.byteconverter.*; 10 import com.daffodilwoods.daffodildb.utils.field.*; 11 import com.daffodilwoods.database.resource.*; 12 13 public class Speriod_991726143unsignedinteger extends AbstractValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, exactnumericliteral, TypeConstants, Datatypes { 14 public unsignedinteger _unsignedinteger0; 15 public Speriod_991726143 _Speriod_9917261431; 16 private ColumnDetails cd; 17 private BigDecimal identifier; 18 private byte[] returningBytes = null; 19 private FieldBase fieldBase; 20 21 public Object run(Object object) throws com.daffodilwoods.database.resource.DException { 22 if (fieldBase == null) { 23 StringBuffer sb = new StringBuffer (); 24 sb.append("."); 25 sb.append(_unsignedinteger0.toString().trim()); 26 String result = sb.toString(); 27 fieldBase = new FieldLiteral(result, -1); 28 } 29 return fieldBase; 30 } 31 32 public ColumnDetails[] getColumnDetails() throws DException { 33 ColumnDetails columnDetails = new ColumnDetails(); 34 columnDetails.setType(CONSTANT); 35 String result = (String ) _Speriod_9917261431.run(null) + ( (Number ) ( (FieldBase) _unsignedinteger0.run(null)).getObject()); 36 columnDetails.setColumnName(new String [] {result}); 37 cd = columnDetails; 38 return new ColumnDetails[] {columnDetails}; 39 } 40 41 public Object [] getParameters(Object object) throws DException { 42 return null; 43 } 44 45 public int getType() { 46 return OTHERS; 47 } 48 49 53 private byte[] getAppropriateBytes() throws DException { 54 int datatype = cd.getDatatype(); 55 switch (datatype) { 56 case INT: 57 case TINYINT: 58 case INTEGER: 59 case LONG: 60 case SHORT: 61 case SMALLINT: 62 case BYTE: 63 throw new DException("DSE4113", new Object [] {StaticClass.getDataTypeName(datatype)}); case FLOAT: 65 return CCzufDpowfsufs.getBytes(new Float (identifier.floatValue())); 66 case DOUBLE: 67 return CCzufDpowfsufs.getBytes(new Double (identifier.doubleValue())); 68 case REAL: 69 case NUMERIC: 70 case BIGDECIMAL: 71 return CCzufDpowfsufs.getBytes(identifier); 72 default: 73 throw new DException("DSE514", new Object [] {new Integer (datatype)}); 74 } 75 } 76 77 public AbstractRowValueExpression[] getChilds() { 78 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 79 return childs; 80 } 81 82 public String toString() { 83 StringBuffer sb = new StringBuffer (); 84 sb.append(" "); 85 sb.append(_Speriod_9917261431); 86 sb.append(" "); 87 sb.append(_unsignedinteger0); 88 return sb.toString(); 89 } 90 91 public Object clone() throws CloneNotSupportedException { 92 Speriod_991726143unsignedinteger tempClass = new Speriod_991726143unsignedinteger(); 93 tempClass._unsignedinteger0 = (unsignedinteger) _unsignedinteger0.clone(); 94 tempClass._Speriod_9917261431 = (Speriod_991726143) _Speriod_9917261431.clone(); 95 return tempClass; 96 } 97 98 public ParameterInfo[] getParameterInfo() throws DException { 99 ParameterInfo parameterInfo = new ParameterInfo(); 100 parameterInfo.setDataType(cd.getDatatype()); 101 return new ParameterInfo[] {parameterInfo}; 102 } 103 104 public int getCardinality() throws DException { 105 return 1; 106 } 107 108 public ByteComparison getByteComparison(Object object) throws DException { 109 return new ByteComparison(true, new int[] {cd.getDatatype()}); 110 } 111 112 } 113 | Popular Tags |