public class RawClause extends WhereClause
Create a raw sql WhereClause, the insertable sql string (such as COLUMN=? or COLUMN<9) can be added manually.
This class can be used to create SQL WHERE clauses not supported by the built-in WhereClause implementations, without the need to implement a new WhereClause class.
WhereClause.ClauseType
SQLClause.SQLType
Constructor and Description |
---|
RawClause(java.lang.String sqlClause,
java.lang.Object[] values,
SQLClause.SQLType[] types,
WhereClause.ClauseType type) |
Modifier and Type | Method and Description |
---|---|
WhereClause.ClauseType |
getClauseType() |
java.lang.Object[] |
getValues()
Note: null value is accepted IF NULL is also set on the valueType map, otherwise behavior is undefined
The values will be added in-order in places designated by ? in the sql string
|
SQLClause.SQLType[] |
getValueTypes() |
void |
toSQLString(java.lang.StringBuilder sql)
print this clause the the given builder, the output should NOT include AND or OR keyword, this will be automatically added when needed
|
public RawClause(java.lang.String sqlClause, java.lang.Object[] values, SQLClause.SQLType[] types, WhereClause.ClauseType type)
sqlClause
- the raw clausevalues
- optional list of valuestypes
- optional list of typestype
- type of this clausepublic SQLClause.SQLType[] getValueTypes()
public java.lang.Object[] getValues()
SQLClause
public void toSQLString(java.lang.StringBuilder sql)
SQLClause
public WhereClause.ClauseType getClauseType()
getClauseType
in class WhereClause
Copyright © 2015 Tampere University of Technology, Pori Department.