KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > xquark > extractor > mysql > MySqlFactory


1 /*
2  * This file belongs to the XQuark distribution.
3  * Copyright (C) 2003 Universite de Versailles Saint-Quentin.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307.
18  * You can also get it at http://www.gnu.org/licenses/lgpl.html
19  *
20  * For more information on this software, see http://www.xquark.org.
21  */

22
23 package org.xquark.extractor.mysql;
24
25 import java.util.List JavaDoc;
26
27 import org.xquark.extractor.sql.*;
28 import org.xquark.jdbc.typing.DbType;
29
30 public class MySqlFactory extends DefaultSqlFactory {
31     private static final String JavaDoc RCSRevision = "$Revision: 1.6 $";
32     private static final String JavaDoc RCSName = "$Name: $";
33
34     static private MySqlFactory _instance = null;
35
36     private MySqlFactory() {
37     }
38
39     static public MySqlFactory getInstance(){
40         if (null ==_instance) {
41             _instance = new MySqlFactory();
42         }
43         return _instance;
44     }
45
46     public SqlConvert createConvert() {
47         return new org.xquark.extractor.mysql.sql.SqlConvert();
48     }
49
50     public SqlConvert createConvert(SqlExpression expr, DbType originalType, DbType targetType){
51         return new org.xquark.extractor.mysql.sql.SqlConvert(expr, originalType, targetType);
52     }
53
54     public SqlTable createTable() {
55         return new org.xquark.extractor.mysql.sql.SqlTable();
56     }
57
58     public SqlTable createTable(String JavaDoc name) {
59         return new org.xquark.extractor.mysql.sql.SqlTable(name);
60     }
61     
62     public SqlTable createTable(String JavaDoc catalogName, String JavaDoc schemaName, String JavaDoc tableName) {
63         return new org.xquark.extractor.mysql.sql.SqlTable(catalogName, schemaName, tableName);
64     }
65     
66     public SqlAttributeExpression createAttributeExpression() {
67         return new org.xquark.extractor.mysql.sql.SqlAttributeExpression();
68     }
69
70     public SqlAttributeExpression createAttributeExpression(String JavaDoc tableInstance, String JavaDoc attribute) {
71         return new org.xquark.extractor.mysql.sql.SqlAttributeExpression(tableInstance, attribute);
72     }
73
74     public SfConcat createSfConcat() {
75         return new org.xquark.extractor.mysql.sql.SfConcat();
76     }
77
78     public SfConcat createSfConcat(List JavaDoc list) {
79         return new org.xquark.extractor.mysql.sql.SfConcat(list);
80     }
81
82     public SfCurrentDateTime createSfCurrentDateTime() {
83         return new org.xquark.extractor.mysql.sql.SfCurrentDateTime();
84     }
85
86     public SfStringLength createSfStringLength(SqlExpression arg0) {
87         return new org.xquark.extractor.mysql.sql.SfStringLength(arg0);
88     }
89
90     public SfSubString createSfSubString() {
91         return new org.xquark.extractor.mysql.sql.SfSubString();
92     }
93
94     public SfSubString createSfSubString(SqlExpression arg0, SqlExpression arg1) {
95         return new org.xquark.extractor.mysql.sql.SfSubString(arg0, arg1);
96     }
97
98     public SqlIfThenElse createIfThenElse() {
99         return new org.xquark.extractor.mysql.sql.SqlIfThenElse();
100     }
101
102     public SqlIfThenElse createIfThenElse(SqlExpression iif, SqlExpression tthen, SqlExpression eslse) {
103         return new org.xquark.extractor.mysql.sql.SqlIfThenElse(iif, tthen, eslse);
104     }
105     public SqlRenameItem createRenameItem() {
106         return new org.xquark.extractor.mysql.sql.SqlRenameItem();
107     }
108
109     public SqlRenameItem createRenameItem(SqlExpression expr, String JavaDoc name) {
110         return new org.xquark.extractor.mysql.sql.SqlRenameItem(expr, name);
111     }
112
113     public SqlRenameRelation createRenameRelation() {
114         return new org.xquark.extractor.mysql.sql.SqlRenameRelation();
115     }
116
117     public SqlRenameRelation createRenameRelation(SqlExpression relation,String JavaDoc alias) {
118         return new org.xquark.extractor.mysql.sql.SqlRenameRelation(relation, alias);
119     }
120
121     public SqlBinOpCompareAny createBinOpCompareAny() {
122         return new org.xquark.extractor.mysql.sql.SqlBinOpCompareAny();
123     }
124
125     public SqlBinOpCompareAny createBinOpCompareAny(int operator, SqlExpression leftOperand, SqlExpression rightOperand) {
126         return new org.xquark.extractor.mysql.sql.SqlBinOpCompareAny(operator, leftOperand, rightOperand);
127     }
128 }
129
Popular Tags