KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > sqls > impl > ObjectFactoryImpl


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.impl;
18
19 import org.apache.ws.jaxme.sqls.Case;
20 import org.apache.ws.jaxme.sqls.Column;
21 import org.apache.ws.jaxme.sqls.ColumnReference;
22 import org.apache.ws.jaxme.sqls.CombinedConstraint;
23 import org.apache.ws.jaxme.sqls.ConstrainedStatement;
24 import org.apache.ws.jaxme.sqls.Expression;
25 import org.apache.ws.jaxme.sqls.Function;
26 import org.apache.ws.jaxme.sqls.JoinReference;
27 import org.apache.ws.jaxme.sqls.ObjectFactory;
28 import org.apache.ws.jaxme.sqls.RawSQLCode;
29 import org.apache.ws.jaxme.sqls.SelectStatement;
30 import org.apache.ws.jaxme.sqls.SelectTableReference;
31 import org.apache.ws.jaxme.sqls.Statement;
32 import org.apache.ws.jaxme.sqls.Table;
33 import org.apache.ws.jaxme.sqls.TableReference;
34 import org.apache.ws.jaxme.sqls.CombinedConstraint.Type;
35
36
37 /** <p>Default implementation of the object factory.</p>
38  *
39  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
40  */

41 public class ObjectFactoryImpl implements ObjectFactory {
42     protected ObjectFactoryImpl() {
43     }
44     
45     public RawSQLCode newRawSQL(String JavaDoc pRawSQLCode) {
46         return new RawSQLCodeImpl(pRawSQLCode);
47     }
48     
49     public JoinReference newJoinReference(SelectTableReference pSelectTableReference,
50             Table pTable,
51             boolean pIsLeftOuterJoin) {
52         return new JoinReferenceImpl(pSelectTableReference, pTable, pIsLeftOuterJoin);
53     }
54     
55     public Function newFunction(Statement pStatement, String JavaDoc pName) {
56         return new FunctionImpl(pStatement, pName);
57     }
58     public Table newView(SelectStatement pSelectStatement, Table.Name pName) {
59         return new ViewImpl(pSelectStatement, pName);
60     }
61
62     public CombinedConstraint newCombinedConstraint(ConstrainedStatement pStatement, Type pType) {
63         return new CombinedConstraintImpl(pStatement, pType);
64     }
65
66     public Case newCase(Column.Type pType) {
67         return new CaseImpl(pType);
68     }
69
70     public ColumnReference newColumnReference(TableReference pTableReference, Column pColumn) {
71         return new ColumnReferenceImpl(pTableReference, pColumn);
72     }
73
74     public Expression createExpression(Statement pStatement, org.apache.ws.jaxme.sqls.Expression.Type pType) {
75         return new ExpressionImpl(pStatement, pType);
76     }
77 }
78
Popular Tags