com.im.commons.db 5.9.2

com.im.commons.db.dml
Class SQLElementFactory

java.lang.Object
  extended by com.im.commons.db.dml.SQLElementFactory
All Implemented Interfaces:
Serializable

public class SQLElementFactory
extends Object
implements Serializable

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
SQLElementFactory(DBDatabaseInfo dbInfo)
          Creates a new instance of SQLElementFactory
 
Method Summary
static SQLWhereClauseCompositeElement createAndClause()
           
static SQLWhereClauseCompositeElement createAndClause(SQLJoin join)
           
static SQLWhereClauseCompositeElement createOrClause()
           
static SQLWhereClauseCompositeElement createOrClause(SQLJoin join)
           
static SQLOrderByClause createOrderByClause(SortColumn[] sortCols)
           
static SQLSelectFunction createSelectFunction(String functionSql, String alias, int jdbcType, Class columnClass)
           
 SQLSelectStatement createSelectStatement()
           
 SQLWhereClauseInListElement createWhereClauseInListElement(TableColumn tableColumn, DBDatabaseInfo.ColumnSQLType colType, Collection values)
          Create an in list where clause of type:
WHERE col IN (1,2,3...)
 SQLWhereClauseInListElement createWhereClauseInListElement(TableColumn tableColumn, DBDatabaseInfo.ColumnSQLType colType, Object[] values)
          Create an in list where clause of type:
WHERE col IN (1,2,3...)
 SQLWhereClauseInListElement createWhereClauseNotInListElement(TableColumn tableColumn, DBDatabaseInfo.ColumnSQLType colType, Collection values)
          Create an in list where clause of type:
WHERE col NOT IN (1,2,3...)
 SQLWhereClauseInListElement createWhereClauseNotInListElement(TableColumn tableColumn, DBDatabaseInfo.ColumnSQLType colType, Object[] values)
          Create an in list where clause of type:
WHERE col NOT IN (1,2,3...)
static SQLWhereClauseStringElement createWhereClauseStringElement(String term)
           
 SQLWhereClauseTermElement createWhereClauseTermElement(TableColumn tableColumn, DBDatabaseInfo.ColumnSQLType columnType, SQLWhereClauseTermElement.SQL_OPERATORS operator, List values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

SQLElementFactory

public SQLElementFactory(DBDatabaseInfo dbInfo)
Creates a new instance of SQLElementFactory

Method Detail

createOrderByClause

public static SQLOrderByClause createOrderByClause(SortColumn[] sortCols)

createAndClause

public static SQLWhereClauseCompositeElement createAndClause()

createOrClause

public static SQLWhereClauseCompositeElement createOrClause()

createAndClause

public static SQLWhereClauseCompositeElement createAndClause(SQLJoin join)

createOrClause

public static SQLWhereClauseCompositeElement createOrClause(SQLJoin join)

createWhereClauseStringElement

public static SQLWhereClauseStringElement createWhereClauseStringElement(String term)

createSelectStatement

public SQLSelectStatement createSelectStatement()

createSelectFunction

public static SQLSelectFunction createSelectFunction(String functionSql,
                                                     String alias,
                                                     int jdbcType,
                                                     Class columnClass)

createWhereClauseTermElement

public SQLWhereClauseTermElement createWhereClauseTermElement(TableColumn tableColumn,
                                                              DBDatabaseInfo.ColumnSQLType columnType,
                                                              SQLWhereClauseTermElement.SQL_OPERATORS operator,
                                                              List values)

createWhereClauseInListElement

public SQLWhereClauseInListElement createWhereClauseInListElement(TableColumn tableColumn,
                                                                  DBDatabaseInfo.ColumnSQLType colType,
                                                                  Collection values)
Create an in list where clause of type:
WHERE col IN (1,2,3...)

Parameters:
tableColumn - The column name
colType - The column type
values - A list of values for the list
Returns:
The SQLInClause

createWhereClauseInListElement

public SQLWhereClauseInListElement createWhereClauseInListElement(TableColumn tableColumn,
                                                                  DBDatabaseInfo.ColumnSQLType colType,
                                                                  Object[] values)
Create an in list where clause of type:
WHERE col IN (1,2,3...)

Parameters:
tableColumn - The column name
colType - The column type
values - An array of values for the list
Returns:
The SQLInClause

createWhereClauseNotInListElement

public SQLWhereClauseInListElement createWhereClauseNotInListElement(TableColumn tableColumn,
                                                                     DBDatabaseInfo.ColumnSQLType colType,
                                                                     Collection values)
Create an in list where clause of type:
WHERE col NOT IN (1,2,3...)

Parameters:
tableColumn - The column name
colType - The column type
values - A list of values for the list
Returns:
The SQLInClause

createWhereClauseNotInListElement

public SQLWhereClauseInListElement createWhereClauseNotInListElement(TableColumn tableColumn,
                                                                     DBDatabaseInfo.ColumnSQLType colType,
                                                                     Object[] values)
Create an in list where clause of type:
WHERE col NOT IN (1,2,3...)

Parameters:
tableColumn - The column name
colType - The column type
values - An array of values for the list
Returns:
The SQLInClause

com.im.commons.db 5.9.2