public class AndClause extends WhereClause
WhereClause.ClauseType
SQLClause.SQLType
Constructor and Description |
---|
AndClause(java.lang.String column,
boolean[] values) |
AndClause(java.lang.String column,
java.util.Collection<? extends java.lang.Object> values,
SQLClause.SQLType type) |
AndClause(java.lang.String column,
double[] values) |
AndClause(java.lang.String column,
int[] values) |
AndClause(java.lang.String column,
long[] values) |
AndClause(java.lang.String column,
java.lang.Object[] values,
SQLClause.SQLType type)
Note: this does creates an IN () clause based on the list of values, NOT multiple AND clauses
that include all of the given values.
|
AndClause(java.lang.String column,
java.lang.Object value,
SQLClause.SQLType 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() |
AndClause |
setNot(boolean not) |
void |
setValues(java.lang.Object[] values,
SQLClause.SQLType type) |
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 AndClause(java.lang.String column, int[] values)
column
- values
- public AndClause(java.lang.String column, long[] values)
column
- values
- public AndClause(java.lang.String column, double[] values)
column
- values
- public AndClause(java.lang.String column, boolean[] values)
column
- values
- public AndClause(java.lang.String column, java.lang.Object value, SQLClause.SQLType type)
column
- value
- can be nulltype
- type of datapublic AndClause(java.lang.String column, java.util.Collection<? extends java.lang.Object> values, SQLClause.SQLType type)
column
- values
- type
- public AndClause(java.lang.String column, java.lang.Object[] values, SQLClause.SQLType type)
column
- values
- can be nulltype
- type of datapublic SQLClause.SQLType[] getValueTypes()
public java.lang.Object[] getValues()
SQLClause
public void setValues(java.lang.Object[] values, SQLClause.SQLType type)
values
- type
- public void toSQLString(java.lang.StringBuilder sql)
SQLClause
public AndClause setNot(boolean not)
not
- set this to be NOT clause on true, remove NOT declaration on falsepublic WhereClause.ClauseType getClauseType()
getClauseType
in class WhereClause
Copyright © 2015 Tampere University of Technology, Pori Department.