1 22 23 package org.xquark.extractor.mysql; 24 25 import java.util.List ; 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 RCSRevision = "$Revision: 1.6 $"; 32 private static final String 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 name) { 59 return new org.xquark.extractor.mysql.sql.SqlTable(name); 60 } 61 62 public SqlTable createTable(String catalogName, String schemaName, String 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 tableInstance, String 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 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 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 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 |