1 package com.daffodilwoods.daffodildb.server.sql99.expression. 2 booleanvalueexpression; 3 4 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.*; 5 import com.daffodilwoods.daffodildb.server.sql99.common.*; 6 import com.daffodilwoods.daffodildb.server.sql99.ddl.descriptors.*; 7 import com.daffodilwoods.daffodildb.server.sql99.dql.iterator.*; 8 import com.daffodilwoods.daffodildb.server.sql99.dql.plan.condition.*; 9 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 10 import com.daffodilwoods.daffodildb.utils.field.*; 11 import com.daffodilwoods.database.resource.*; 12 import com.daffodilwoods.database.sqlinitiator.*; 13 14 public class parenlength extends AbstractRowValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter { 15 16 public void setColumnPredicates(_AllColumnPredicates allColumnPredicates) throws 17 DException { 18 throw new DException("DSE565", new Object [] {"setColumnPredicates()"}); 19 } 20 21 public _Iterator execute(_IndexTable indexTable, _Order order, 22 String [] queryColumns, TableDetails tableDetails) throws 23 DException { 24 throw new DException("DSE565", new Object [] {"execute()"}); 25 } 26 27 public length _length0; 28 29 public Object run(Object object) throws com.daffodilwoods.database.resource. 30 DException { 31 FieldBase len = (FieldBase) _length0.run(null); 32 Object maxLength = len.getObject(); 33 Integer length = new Integer (maxLength.hashCode()); 34 35 if (length.intValue() == 0) { 36 throw new DException("DSE8069", null); 37 } 38 39 if (! (maxLength instanceof Byte 40 || maxLength instanceof Short )) { 41 throw new DException("DSE8107", new Object [] {maxLength, 42 new Integer (DataTypeDescriptor.implicit_maximum_character_length)}); 43 } 44 return length; 45 } 46 47 public AbstractRowValueExpression[] getChilds() { 48 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 49 return childs; 50 } 51 52 public String toString() { 53 StringBuffer sb = new StringBuffer (); 54 sb.append(" "); 55 sb.append("("); 56 sb.append(" "); 57 sb.append(_length0); 58 sb.append(" "); 59 sb.append(")"); 60 return sb.toString(); 61 } 62 63 public Object clone() throws CloneNotSupportedException { 64 parenlength tempClass = new parenlength(); 65 tempClass._length0 = (length) _length0.clone(); 66 return tempClass; 67 } 68 } 69 | Popular Tags |