KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > sqls > oracle > OraStatementMetaData


1 /*
2  * Copyright 2003, 2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15
16  */

17 package org.apache.ws.jaxme.sqls.oracle;
18
19 import org.apache.ws.jaxme.sqls.ColumnReference;
20 import org.apache.ws.jaxme.sqls.DeleteStatement;
21 import org.apache.ws.jaxme.sqls.InsertStatement;
22 import org.apache.ws.jaxme.sqls.SelectStatement;
23 import org.apache.ws.jaxme.sqls.UpdateStatement;
24 import org.apache.ws.jaxme.sqls.impl.StatementMetaData;
25
26
27 /** <p>Oracle specific version of {@link StatementMetaData}.</p>
28  */

29 public class OraStatementMetaData extends StatementMetaData {
30     /** <p>Creates new meta data for the given
31      * {@link org.apache.ws.jaxme.sqls.SelectStatement}.</p>
32      */

33     public OraStatementMetaData(SelectStatement pQuery) {
34         super(pQuery);
35     }
36
37     /** <p>Creates new meta data for the given
38      * {@link org.apache.ws.jaxme.sqls.DeleteStatement}.</p>
39      */

40     public OraStatementMetaData(DeleteStatement pQuery) {
41         super(pQuery);
42     }
43
44     /** <p>Creates new meta data for the given
45      * {@link org.apache.ws.jaxme.sqls.InsertStatement}.</p>
46      */

47     public OraStatementMetaData(InsertStatement pQuery, ColumnReference[] pColumns) {
48         super(pQuery, pColumns);
49     }
50
51     /** <p>Creates new meta data for the given
52      * {@link org.apache.ws.jaxme.sqls.UpdateStatement}.</p>
53      */

54     public OraStatementMetaData(UpdateStatement pQuery, ColumnReference[] pColumns) {
55         super(pQuery, pColumns);
56     }
57
58     protected void addSelectStatement(SelectStatement pQuery) {
59         super.addSelectStatement(pQuery);
60         if (pQuery instanceof OraSelectStatement) {
61             OraSelectStatement oQuery = (OraSelectStatement) pQuery;
62             addCombinedConstraint(oQuery.getStartWith());
63             addCombinedConstraint(oQuery.getConnectBy());
64         }
65     }
66 }
67
Popular Tags