public final class SqlRestrictions extends Object
| Modifier and Type | Method and Description |
|---|---|
static SqlRestriction |
and(Collection<SqlRestriction> restrictions)
AND combination of restrictions
|
static SqlRestriction |
and(SqlRestriction... restrictions)
AND combination of restrictions
|
static SqlRestriction |
between(String field)
The specified field falls inside a range; (field BETWEEN ? AND ?).
|
static SqlRestriction |
between(String field,
String lowerBound,
String upperBound)
The specified field falls inside a range; (field BETWEEN lowerBound AND upperBound).
|
static SqlRestriction |
eq(String field)
Equality between the provided field name and '?'
|
static SqlRestriction |
eq(String lhs,
String rhs)
Equality between two operands (lhs = rhs).
|
static SqlRestriction |
gt(String field)
The specified field is greater-than another operand specified
by a '?' character
|
static SqlRestriction |
gte(String field)
The specified field is greater-than-or-equal to another operand specified
by a '?' character
|
static SqlRestriction |
in(String field,
int operandCount)
The specified field is in a list of provided parameters; (field IN (?,?,?,...))
|
static SqlRestriction |
in(String field,
SelectSqlStatement selectStatement)
The specified field lies in the result of the provided sub-query
|
static SqlRestriction |
lt(String field)
The specified field is less-than another operand specified
by a '?' character
|
static SqlRestriction |
lte(String field)
The specified field is less-than-or-equal to another operand specified
by a '?' character
|
public static SqlRestriction eq(String field)
public static SqlRestriction eq(String lhs, String rhs)
PreparedStatement.public static SqlRestriction and(SqlRestriction... restrictions)
public static SqlRestriction and(Collection<SqlRestriction> restrictions)
public static SqlRestriction between(String field)
public static SqlRestriction between(String field, String lowerBound, String upperBound)
PreparedStatementpublic static SqlRestriction in(String field, int operandCount)
field - The field name or its aliasoperandCount - The number of operands in the list of possible valuespublic static SqlRestriction in(String field, SelectSqlStatement selectStatement)
field - The field name or its aliasselectStatement - The sub-querypublic static SqlRestriction lte(String field)
field - The field name or its aliaspublic static SqlRestriction lt(String field)
field - The field name or its aliaspublic static SqlRestriction gte(String field)
field - The field name or its aliaspublic static SqlRestriction gt(String field)
field - Copyright © 2013. All Rights Reserved.