com.im.commons.db.dml
Class SQLElementFactory
java.lang.Object
com.im.commons.db.dml.SQLElementFactory
- All Implemented Interfaces:
- Serializable
public class SQLElementFactory
- extends Object
- implements Serializable
- See Also:
- Serialized Form
|
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 |
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
SQLElementFactory
public SQLElementFactory(DBDatabaseInfo dbInfo)
- Creates a new instance of SQLElementFactory
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 namecolType - The column typevalues - 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 namecolType - The column typevalues - 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 namecolType - The column typevalues - 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 namecolType - The column typevalues - An array of values for the list
- Returns:
- The SQLInClause