KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > server > sql99 > dql > queryexpression > queryspecification > asteriskedidentifierchainSperiod_991726143Sasterisk_344623246


1 package com.daffodilwoods.daffodildb.server.sql99.dql.queryexpression.queryspecification;
2
3 import java.util.*;
4 import com.daffodilwoods.daffodildb.server.serversystem.*;
5 import com.daffodilwoods.daffodildb.server.sql99.common.*; //import com.daffodilwoods.daffodildb.server.sql99.common.Properties;
6
import com.daffodilwoods.daffodildb.server.sql99.token.*;
7 import com.daffodilwoods.daffodildb.server.sql99.utils.*;
8 import com.daffodilwoods.database.resource.*;
9
10 /**
11  * It represents the qualifiedname.asterisk in select list of query.
12  * This qualifiedtablename can either be simply tablename or schema.tableName
13  * or catalog.schema.tablename. If it is specified in selectlist, then all the
14  * columns of table represented by qualifiedname are implicit.
15  * <p>Title: </p>
16  * <p>Description: </p>
17  * <p>Copyright: Copyright (c) 2003</p>
18  * <p>Company: </p>
19  * @author unascribed
20  * @version 1.0
21  */

22
23
24 public class asteriskedidentifierchainSperiod_991726143Sasterisk_344623246 implements com.daffodilwoods.daffodildb.utils.parser.StatementExecuter, qualifiedasterisk {
25
26   /**
27    * Represents an asterisk
28    */

29
30   public Sasterisk_344623246 _Sasterisk_3446232460;
31
32   /**
33    * Represents a period
34    */

35
36   public Speriod_991726143 _Speriod_9917261431;
37
38   /**
39    * Represents a qualified name.
40    */

41
42   public asteriskedidentifierchain _asteriskedidentifierchain2;
43
44   /**
45    * It represents the column of qualifiedname.*
46    */

47
48   private ColumnDetails[] columnDetails;
49
50   /**
51    * It represents all the columns of table represented by qualified name.
52    */

53
54   private ColumnDetails[] derived;
55
56   /**
57    * For the documentation of underlying methods, refer to documentation of
58    * select sublist.
59    */

60
61    public _Reference[] getReferences(TableDetails[] tableDetails) throws DException {
62       return null;
63    }
64    public Object JavaDoc run(Object JavaDoc object) throws com.daffodilwoods.database.resource.DException {
65       throw new DException("DSE16", new Object JavaDoc[] {"run"});
66    }
67    public ParameterInfo[] getParameterInfo() throws DException {
68      return null;
69    }
70      public Object JavaDoc[] getParameters(Object JavaDoc object) throws DException {
71        return null;
72      }
73
74    public void getColumnsIncluded(ArrayList parm1) throws com.daffodilwoods.database.resource.DException {
75       if (derived == null) {
76          getDerivedColumnDetails();
77       }
78       for (int i = 0; i < derived.length; i++) {
79          parm1.add(derived[i].getColumnName());
80       }
81    }
82
83    /**
84     * Returns all the columns of table represented by asteriskedidentifierchain.
85     * @return
86     * @throws DException
87     */

88
89    public ColumnDetails[] getDerivedColumnDetails() throws DException {
90       if (derived == null) {
91          try {
92             derived = (ColumnDetails[]) columnDetails[0].getObject();
93          } catch (NullPointerException JavaDoc ex) {
94             throw new DException("DSE3574", null);
95          }
96          if (derived == null) {
97             throw new DException("DSE959",new Object JavaDoc[]{columnDetails[0].getQualifiedColumnName()});
98          }
99
100       }
101       return derived;
102    }
103
104
105    public _Reference[] checkSemantic(_ServerSession parent) throws DException {
106       return null;
107    }
108
109    /**
110     * Returns asterisk as column whose table is represented by
111     * asteriskedidentifierchain.
112     * @return
113     * @throws DException
114     */

115
116
117    public ColumnDetails[] getColumnDetails() throws DException {
118       String JavaDoc[] temp = (String JavaDoc[]) _asteriskedidentifierchain2.run(null);
119       int length = temp.length;
120       String JavaDoc[] result = new String JavaDoc[length + 1];
121       System.arraycopy(temp, 0, result, 0, length);
122       result[length] = "*";
123       ColumnDetails column = new ColumnDetails();
124       column.setColumnName(result);
125      column.setType(CONSTANT);
126       columnDetails = new ColumnDetails[] {column};
127       return columnDetails;
128    }
129
130
131
132
133    public String JavaDoc toString() {
134       StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
135       sb.append(" ");
136       sb.append(_asteriskedidentifierchain2);
137       sb.append(" ");
138       sb.append(_Speriod_9917261431);
139       sb.append(" ");
140       sb.append(_Sasterisk_3446232460);
141       return sb.toString();
142    }
143
144    public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
145       asteriskedidentifierchainSperiod_991726143Sasterisk_344623246 tempClass = new asteriskedidentifierchainSperiod_991726143Sasterisk_344623246();
146       tempClass._Sasterisk_3446232460 = (Sasterisk_344623246) _Sasterisk_3446232460.clone();
147       tempClass._Speriod_9917261431 = (Speriod_991726143) _Speriod_9917261431.clone();
148       tempClass._asteriskedidentifierchain2 = (asteriskedidentifierchain) _asteriskedidentifierchain2.clone();
149       return tempClass;
150    }
151
152    /**
153     * For documentation of underlying methods, refer to documentation of
154     * _sortspecificationAndselectSubList
155     */

156
157    public ByteComparison getByteComparison(Object JavaDoc object) throws DException {
158       return new ByteComparison(true, getDatatypes());
159    }
160
161    private int[] getDatatypes() throws DException {
162       int[] datatypes = new int[derived.length];
163       for (int i = 0; i < derived.length; i++) {
164          datatypes[i] = derived[i].getDatatype();
165       }
166       return datatypes;
167    }
168
169    public ColumnDetails[] getChildColumnDetails() throws DException {
170       return getColumnDetails();
171    }
172 }
173
Popular Tags