| 1 package com.daffodilwoods.daffodildb.server.sql99.expression. 2 booleanvalueexpression; 3 4 import com.daffodilwoods.daffodildb.server.sql99.common.*; 5 import com.daffodilwoods.daffodildb.server.sql99.ddl.descriptors.*; 6 import com.daffodilwoods.daffodildb.server.sql99.expression.rowvalueexpression.*; 7 import com.daffodilwoods.daffodildb.server.sql99.token.*; 8 import com.daffodilwoods.database.resource.*; 9 10 public class SRESERVEDWORD1206543922SRESERVEDWORD1206543922parenlength extends AbstractRowValueExpression implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, 11 characterstringtype, bitstringtype { 12 13 14 public parenlength _parenlength0; 15 public SRESERVEDWORD1206543922 _SRESERVEDWORD12065439221; 16 public SRESERVEDWORD1206543922 _SRESERVEDWORD12065439222; 17 DataTypeDescriptor dataTypeDescriptor; 18 19 public void setDescriptor(_Descriptor dataTypeDescriptor) throws DException { 20 this.dataTypeDescriptor = (DataTypeDescriptor) dataTypeDescriptor; 21 } 22 23 public Object run(Object object) throws DException { 24 if (dataTypeDescriptor == null) { 25 throw new DException("DSE492", null); 26 } 27 String type = _SRESERVEDWORD12065439222.toString(); 28 if (_parenlength0 == null) { 29 throw new DException("DSE558", null); 30 } else { 31 if (type.equalsIgnoreCase(SqlKeywords.CHARACTER)) { 32 dataTypeDescriptor.data_Type = "CHARACTER VARYING"; 33 } else if (type.equalsIgnoreCase(SqlKeywords.CHAR)) { 34 dataTypeDescriptor.data_Type = "CHAR VARYING"; 35 } else if (type.equalsIgnoreCase(SqlKeywords.NCHAR)) { 36 dataTypeDescriptor.data_Type = "NCHAR VARYING"; 37 } else if (type.equalsIgnoreCase(SqlKeywords.BIT)) { 38 dataTypeDescriptor.data_Type = "BIT VARYING"; 39 } else { 40 throw new DException("DSE1133", 41 new Object [] {_SRESERVEDWORD12065439222 + " " + 42 _SRESERVEDWORD12065439221}); 43 } 44 Integer maximumLength = null; 45 try { 46 maximumLength = (Integer ) _parenlength0.run(null); 47 } catch (DException ex) { 48 if (ex.getDseCode().equalsIgnoreCase("DSE8069")) { 49 throw new DException("DSE8150", new Object [] {dataTypeDescriptor.dtd_identifier}); 50 } 51 throw ex; 52 } 53 if (maximumLength.intValue() > 54 dataTypeDescriptor.implicit_maximum_character_length) { 55 throw new DException("DSE985", new Object [] {maximumLength, 56 new Integer (dataTypeDescriptor. 57 implicit_maximum_character_length)}); 58 } 59 dataTypeDescriptor.character_maximum_length = maximumLength; 60 dataTypeDescriptor.character_octet_length = new Integer (0); 61 } 62 return null; 63 64 } 65 66 public AbstractRowValueExpression[] getChilds() { 67 AbstractRowValueExpression[] childs = new AbstractRowValueExpression[] {}; 68 return childs; 69 70 } 71 72 public String toString() { 73 StringBuffer sb = new StringBuffer (); 74 sb.append(" "); 75 sb.append(_SRESERVEDWORD12065439222); 76 sb.append(" "); 77 sb.append(_SRESERVEDWORD12065439221); 78 sb.append(" "); 79 sb.append(_parenlength0); 80 return sb.toString(); 81 } 82 83 public Object clone() throws CloneNotSupportedException { 84 SRESERVEDWORD1206543922SRESERVEDWORD1206543922parenlength tempClass = new 85 SRESERVEDWORD1206543922SRESERVEDWORD1206543922parenlength(); 86 tempClass._parenlength0 = (parenlength) _parenlength0.clone(); 87 tempClass._SRESERVEDWORD12065439221 = (SRESERVEDWORD1206543922) 88 _SRESERVEDWORD12065439221.clone(); 89 tempClass._SRESERVEDWORD12065439222 = (SRESERVEDWORD1206543922) 90 _SRESERVEDWORD12065439222.clone(); 91 return tempClass; 92 } 93 } 94 | Popular Tags |