KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > expression > booleanvalueexpression > SRESERVEDWORD1206543922OptparenlengthOptwithorwithouttimezone


1 package com.daffodilwoods.daffodildb.server.sql99.expression.booleanvalueexpression;
2
3 import com.daffodilwoods.daffodildb.server.datasystem.interfaces.*;
4 import com.daffodilwoods.daffodildb.server.sql99.common.*;
5 import com.daffodilwoods.daffodildb.server.sql99.ddl.descriptors.*;
6 import com.daffodilwoods.daffodildb.server.sql99.ddl.schemadefinition.*;
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.token.*;
10 import com.daffodilwoods.daffodildb.server.sql99.utils.*;
11 import com.daffodilwoods.database.resource.*;
12 import com.daffodilwoods.database.sqlinitiator.*;
13
14 public class SRESERVEDWORD1206543922OptparenlengthOptwithorwithouttimezone implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, datetimetype, datatypedomainname {
15
16    public void setDefaultValuesForQualifiedJoin(_VariableValueOperations variableValueOperation, TableDetails[] tableDetails) throws DException {
17    }
18
19    public void setDefaultValues(_VariableValueOperations variableValueOperation) throws DException {
20    }
21
22    public boolean checkForSubQuery() throws DException {
23       return false;
24    }
25
26    public String JavaDoc[] getTableNamesInBVE() throws DException {
27       throw new DException("DSE565", new Object JavaDoc[] {"getTableNamesInBVE()"});
28    }
29
30    public void setColumnPredicates(_AllColumnPredicates allColumnPredicates) throws DException {
31       throw new DException("DSE565", new Object JavaDoc[] {"setColumnPredicates()"});
32    }
33
34    public _Iterator execute(_IndexTable indexTable, _Order order, String JavaDoc[] queryColumns, TableDetails tableDetails) throws DException {
35       throw new DException("DSE565", new Object JavaDoc[] {"execute()"});
36    }
37
38    public String JavaDoc toString() {
39       StringBuffer JavaDoc clause = new StringBuffer JavaDoc();
40       clause.append(" ");
41       clause.append(_SRESERVEDWORD12065439222);
42       if (_Optparenlength1 != null) {
43          clause.append(" ");
44          clause.append(_Optparenlength1);
45       }
46
47       if (_Optwithorwithouttimezone0 != null) {
48          clause.append(" ");
49          clause.append(_Optwithorwithouttimezone0);
50       }
51
52       return clause.toString().trim();
53
54    }
55
56    public withorwithouttimezone _Optwithorwithouttimezone0;
57    public parenlength _Optparenlength1;
58    public SRESERVEDWORD1206543922 _SRESERVEDWORD12065439222;
59    DataTypeDescriptor dataTypeDescriptor;
60
61    public void setDescriptor(_Descriptor dataTypeDescriptor) {
62       this.dataTypeDescriptor = (DataTypeDescriptor) dataTypeDescriptor;
63    }
64
65    public Object JavaDoc run(Object JavaDoc object) throws DException {
66       if (dataTypeDescriptor == null) {
67          throw new DException("DSE492", null);
68       }
69       String JavaDoc at = (String JavaDoc) _SRESERVEDWORD12065439222.run(object);
70       at = at.trim();
71       boolean time = at.equalsIgnoreCase("TIME");
72       dataTypeDescriptor.data_Type = time ? SqlKeywords.TIME : SqlKeywords.TIMESTAMP;
73       int timeFractionalPrecision = 0;
74       if (time) {
75          timeFractionalPrecision = _Optparenlength1 == null ? 0 : ( (Integer JavaDoc) _Optparenlength1.run(null)).intValue();
76       } else {
77          timeFractionalPrecision = _Optparenlength1 == null ? 6 : ( (Integer JavaDoc) _Optparenlength1.run(null)).intValue();
78       }
79       if (timeFractionalPrecision > dataTypeDescriptor.implicit_maximum_time_precision) {
80          throw new DException("DSE994", new Object JavaDoc[] {new Integer JavaDoc(timeFractionalPrecision), new Integer JavaDoc(dataTypeDescriptor.implicit_maximum_time_precision)});
81       }
82       int withOrWithOutTimePrecission = 0;
83       if (time) {
84          withOrWithOutTimePrecission = _Optwithorwithouttimezone0 == null ||
85              ( (String JavaDoc) _Optwithorwithouttimezone0.run(null)).equalsIgnoreCase("Without TimeZone")
86              ? 8 : 14;
87       } else {
88          withOrWithOutTimePrecission = _Optwithorwithouttimezone0 == null ||
89              ( (String JavaDoc) _Optwithorwithouttimezone0.run(null)).equalsIgnoreCase("Without TimePrecision")
90              ? 19 : 25;
91       }
92       dataTypeDescriptor.datatime_precision = timeFractionalPrecision > 0
93           ? new Integer JavaDoc(timeFractionalPrecision + withOrWithOutTimePrecission + 1)
94           : new Integer JavaDoc(timeFractionalPrecision + withOrWithOutTimePrecission);
95       return null;
96    }
97
98    public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
99       SRESERVEDWORD1206543922OptparenlengthOptwithorwithouttimezone tempClass = new SRESERVEDWORD1206543922OptparenlengthOptwithorwithouttimezone();
100       if (_Optwithorwithouttimezone0 != null) {
101          tempClass._Optwithorwithouttimezone0 = (withorwithouttimezone) _Optwithorwithouttimezone0.clone();
102       }
103       if (_Optparenlength1 != null) {
104          tempClass._Optparenlength1 = (parenlength) _Optparenlength1.clone();
105       }
106       tempClass._SRESERVEDWORD12065439222 = (SRESERVEDWORD1206543922) _SRESERVEDWORD12065439222.clone();
107       return tempClass;
108    }
109 }
110
Popular Tags