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.daffodildb.utils.field.*; 11 import com.daffodilwoods.database.resource.*; 12 13 public class characterstringliteral extends AbstractValueExpression implements delimitertoken, generalliteral, TypeConstants, Datatypes { 14 public String _characterstringliteral0; 15 16 private byte[] returningBytes = null; 17 18 public int getCardinality() throws DException { 19 return 1; 20 } 21 22 public com.daffodilwoods.daffodildb.server.sql99.utils._Reference[] checkSemantic(com.daffodilwoods.daffodildb.server.serversystem. 23 _ServerSession parent) throws DException { 24 return null; 25 } 26 27 private FieldBase fieldBase = null; 28 29 public Object run(Object object) throws com.daffodilwoods.database.resource. 30 DException { 31 if (fieldBase == null) { 32 fieldBase = new FieldStringLiteral(_characterstringliteral0, CHARACTER); 33 } 34 return fieldBase; 35 } 36 37 private ColumnDetails columnD; 38 39 public ColumnDetails[] getColumnDetails() throws DException { 40 if (columnDetails == null) { 41 columnD = new ColumnDetails(); 42 columnD.setType(CONSTANT); 43 columnD.setDatatype(Datatypes.CHARACTER); 44 columnD.setColumnName(new String [] {_characterstringliteral0}); 45 columnD.setSize(_characterstringliteral0.length()); 46 columnD.setObject(this); 47 columnDetails = new ColumnDetails[] {columnD}; 48 } 49 return columnDetails; 50 } 51 52 public Object [] getParameters(Object object) throws DException { 53 return null; 54 } 55 56 public int getType() { 57 return OTHERS; 58 } 59 60 public AbstractRowValueExpression[] getChilds() { 61 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 62 return childs; 63 } 64 65 public String toString() { 66 StringBuffer sb = new StringBuffer (); 67 sb.append(" "); 68 sb.append("'"); 69 sb.append(GeneralPurposeStaticClass.getFormattedString(_characterstringliteral0, '\'')); 70 sb.append("'"); 71 return sb.toString(); 72 } 73 74 public Object clone() throws CloneNotSupportedException { 75 characterstringliteral tempClass = new characterstringliteral(); 76 tempClass._characterstringliteral0 = _characterstringliteral0; 77 return tempClass; 78 } 79 80 public void getColumnsIncluded(ArrayList aList) throws DException { 81 } 82 83 public void getTablesIncluded(ArrayList aList) throws DException { 84 } 85 86 public ParameterInfo[] getParameterInfo() throws DException { 87 ParameterInfo parameterInfo = new ParameterInfo(); 88 parameterInfo.setDataType(Datatypes.CHARACTER); 89 return new ParameterInfo[] {parameterInfo}; 90 } 91 92 public ByteComparison getByteComparison(Object object) throws DException { 93 return new ByteComparison(true, new int[] {CHARACTER}); 94 } 95 96 public void releaseResource() throws DException { 97 98 } 99 100 } 101 | Popular Tags |