public class OrmPredicates extends Object
This class determines whether the value of conditional expressions in the ORM database is true
or false.
SystemCapability.Data#DATA_APPDATAMGR| 构造器 | 说明 |
|---|---|
OrmPredicates(Class<T> klass) |
A parameterized constructor used to create an
OrmPredicates instance for searching ORM objects. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
OrmPredicates |
and() |
Adds an
and condition to the predicate. |
OrmPredicates |
beginsWith(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value starts
with a specified string. |
OrmPredicates |
beginWrap() |
Adds a left parenthesis to the predicate.
|
OrmPredicates |
between(String field,
double low,
double high) |
Configures the predicates to match the specified field whose data type is
double and value
is within a given range. |
OrmPredicates |
between(String field,
float low,
float high) |
Configures the predicates to match the specified field whose data type is
float and value
is within a given range. |
OrmPredicates |
between(String field,
int low,
int high) |
Configures the predicates to match the specified field whose data type is
int and value
is within a given range. |
OrmPredicates |
between(String field,
long low,
long high) |
Configures the predicates to match the specified field whose data type is
long and value
is within a given range. |
OrmPredicates |
between(String field,
String low,
String high) |
Configures the predicates to match the specified field whose data type is
String and value
is within a given range. |
OrmPredicates |
between(String field,
Time low,
Time high) |
Configures the predicates to match the specified field whose data type is
Time and value
is within a given range. |
OrmPredicates |
between(String field,
Timestamp low,
Timestamp high) |
Configures the predicates to match the specified field whose data type is
Timestamp and value
is within a given range. |
OrmPredicates |
between(String field,
Calendar low,
Calendar high) |
Configures the predicates to match the specified field whose data type is
Calendar and value
is within a given range. |
OrmPredicates |
between(String field,
Date low,
Date high) |
Configures the predicates to match the specified field whose data type is
Date and value
is within a given range. |
void |
clear() |
Clears the search conditions of
OrmPredicates. |
OrmPredicates |
contains(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value
contains a specified value. |
<J extends OrmObject> |
crossJoin(Class<J> clz) |
Adds a
cross join condition to a SQL statement. |
OrmPredicates |
distinct() |
Configures the predicates to filter out duplicate records and retain only one of them.
|
OrmPredicates |
endsWith(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value
ends with a specified string. |
OrmPredicates |
endWrap() |
Adds a right parenthesis to the predicate.
|
OrmPredicates |
equalTo(String field,
boolean value) |
Configures the predicates to match the field whose data type is
boolean and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
byte value) |
Configures the predicates to match the field whose data type is
byte and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
short value) |
Configures the predicates to match the field whose data type is
short and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value is equal
to a specified value. |
OrmPredicates |
equalTo(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value is equal
to a specified value. |
String |
getEntityName() |
Obtains the value of variable
entityName. |
OrmPredicates |
glob(String field,
String value) |
|
OrmPredicates |
greaterThan(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value is
greater than a specified value. |
OrmPredicates |
greaterThan(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value is
greater than a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value is
greater than or equal to a specified value. |
OrmPredicates |
greaterThanOrEqualTo(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value is
greater than or equal to a specified value. |
OrmPredicates |
groupBy(String[] fields) |
Configures
OrmPredicates to group query results by specified columns. |
OrmPredicates |
in(String field,
double[] values) |
Configures
OrmPredicates to match the specified field whose data type is double array and values
are within a given range. |
OrmPredicates |
in(String field,
float[] values) |
Configures
OrmPredicates to match the specified field whose data type is float array and values
are within a given range. |
OrmPredicates |
in(String field,
int[] values) |
Configures
OrmPredicates to match the specified field whose data type is int array and values are
within a given range. |
OrmPredicates |
in(String field,
long[] values) |
Configures
OrmPredicates to match the specified field whose data type is long array and values
are within a given range. |
OrmPredicates |
in(String field,
String[] values) |
Configures
OrmPredicates to match the specified field whose data type is String array and values
are within a given range. |
OrmPredicates |
in(String field,
Time[] values) |
Configures
OrmPredicates to match the specified field whose data type is Time array and values
are within a given range. |
OrmPredicates |
in(String field,
Timestamp[] values) |
Configures
OrmPredicates to match the specified field whose data type is Timestamp array and values
are within a given range. |
OrmPredicates |
in(String field,
Calendar[] values) |
Configures
OrmPredicates to match the specified field whose data type is Calendar array and values
are within a given range. |
OrmPredicates |
in(String field,
Date[] values) |
Configures
OrmPredicates to match the specified field whose data type is Date array and values
are within a given range. |
OrmPredicates |
indexedBy(String indexName) |
Configures
OrmPredicates to specify the index column. |
<J extends OrmObject> |
innerJoin(Class<J> clz) |
Adds an
inner join condition to a SQL statement. |
OrmPredicates |
isNotNull(String field) |
Configures the predicates to match the specified fields whose value is not
null. |
OrmPredicates |
isNull(String field) |
Configures the predicates to match the fields whose value is
null. |
<J extends OrmObject> |
leftOuterJoin(Class<J> clz) |
Adds a
left outer join condition to a SQL statement. |
OrmPredicates |
lessThan(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value
is less than a specified value. |
OrmPredicates |
lessThan(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value
is less than a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value
is less than or equal to a specified value. |
OrmPredicates |
lessThanOrEqualTo(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value
is less than or equal to a specified value. |
OrmPredicates |
like(String field,
String value) |
Configures the predicates to match the fields whose data type is
String and value is
similar to a specified string. |
OrmPredicates |
limit(int value) |
Sets the maximum number of data records in the column that match the specified predicates.
|
OrmPredicates |
notBetween(String field,
double low,
double high) |
Configures
OrmPredicates to match the specified field whose data type is double and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
float low,
float high) |
Configures
OrmPredicates to match the specified field whose data type is float and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
int low,
int high) |
Configures
OrmPredicates to match the specified field whose data type is int and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
long low,
long high) |
Configures
OrmPredicates to match the specified field whose data type is long and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
String low,
String high) |
|
OrmPredicates |
notBetween(String field,
Time low,
Time high) |
Configures
OrmPredicates to match the specified field whose data type is Time and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
Timestamp low,
Timestamp high) |
Configures
OrmPredicates to match the specified field whose data type is Timestamp and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
Calendar low,
Calendar high) |
Configures
OrmPredicates to match the specified field whose data type is Calendar and value is out of a
given range. |
OrmPredicates |
notBetween(String field,
Date low,
Date high) |
Configures
OrmPredicates to match the specified field whose data type is Date and value is out of a
given range. |
OrmPredicates |
notEqualTo(String field,
boolean value) |
Configures the predicates to match the field whose data type is
boolean and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
byte value) |
Configures the predicates to match the field whose data type is
byte and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
double value) |
Configures the predicates to match the field whose data type is
double and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
float value) |
Configures the predicates to match the field whose data type is
float and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
int value) |
Configures the predicates to match the field whose data type is
int and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
long value) |
Configures the predicates to match the field whose data type is
long and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
short value) |
Configures the predicates to match the field whose data type is
short and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
String value) |
Configures the predicates to match the field whose data type is
String and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
Time value) |
Configures the predicates to match the field whose data type is
Time and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
Timestamp value) |
Configures the predicates to match the field whose data type is
Timestamp and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
Calendar value) |
Configures the predicates to match the field whose data type is
Calendar and value is unequal to
a specified value. |
OrmPredicates |
notEqualTo(String field,
Date value) |
Configures the predicates to match the field whose data type is
Date and value is unequal to
a specified value. |
OrmPredicates |
notIn(String field,
double[] values) |
Configures
OrmPredicates to match the specified field whose data type is double array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
float[] values) |
Configures
OrmPredicates to match the specified field whose data type is float array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
int[] values) |
Configures
OrmPredicates to match the specified field whose data type is int array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
long[] values) |
Configures
OrmPredicates to match the specified field whose data type is long array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
String[] values) |
Configures
OrmPredicates to match the specified field whose data type is String array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
Time[] values) |
Configures
OrmPredicates to match the specified field whose data type is Time array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
Timestamp[] values) |
Configures
OrmPredicates to match the specified field whose data type is Timestamp array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
Calendar[] values) |
Configures
OrmPredicates to match the specified field whose data type is Calendar array and values
are out of a given range. |
OrmPredicates |
notIn(String field,
Date[] values) |
Configures
OrmPredicates to match the specified field whose data type is Date array and values
are out of a given range. |
OrmPredicates |
offset(int rowOffset) |
Configures
OrmPredicates to specify the start position of the returned result. |
OrmPredicates |
on(String... clauses) |
Adds an
on condition to the predicate. |
OrmPredicates |
or() |
Adds an
or condition to the predicate. |
OrmPredicates |
orderByAsc(String field) |
Configures the predicates to match the columns whose values are sorted in ascending order.
|
OrmPredicates |
orderByDesc(String field) |
Configures the predicates to match the columns whose values are sorted in descending order.
|
OrmPredicates |
using(String... fields) |
Adds a
using condition to the predicate. |
public OrmPredicates(Class<T> klass)
OrmPredicates instance for searching ORM objects.klass - Indicates the class of the ORM objects to search.public void clear()
OrmPredicates.
This method retains only the value of private attribute entityName in OrmPredicates and
restores other private attributes to their default values.
public String getEntityName()
entityName.
Obtain value of variable entityName.entityName.public OrmPredicates equalTo(String field, byte value)
byte and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, short value)
short and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, int value)
int and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, long value)
long and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, double value)
double and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, float value)
float and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, boolean value)
boolean and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, Date value)
Date and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, Time value)
Time and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, Timestamp value)
Timestamp and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, Calendar value)
Calendar and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates equalTo(String field, String value)
String and value is equal
to a specified value.
This method is similar to = of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, byte value)
byte and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, short value)
short and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, int value)
int and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, long value)
long and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, double value)
double and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, float value)
float and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, boolean value)
boolean and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, Date value)
Date and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, Time value)
Time and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, Timestamp value)
Timestamp and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, Calendar value)
Calendar and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates notEqualTo(String field, String value)
String and value is unequal to
a specified value.
This method is similar to != of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates beginWrap()
This method is similar to ( of the SQL statement and needs to be used together
with endWrap().
public OrmPredicates endWrap()
This method is similar to ) of the SQL statement and needs to be used together
with beginWrap().
public OrmPredicates or()
or condition to the predicate.
This method is similar to or of the SQL statement.
or condition.public OrmPredicates and()
and condition to the predicate.
This method is similar to and of the SQL statement.
and condition.public OrmPredicates contains(String field, String value)
String and value
contains a specified value.
This method is similar to contains of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates beginsWith(String field, String value)
String and value starts
with a specified string.
This method is similar to value% of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates endsWith(String field, String value)
String and value
ends with a specified string.
This method is similar to %value of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates isNull(String field)
null.
This method is similar to is null of the SQL statement.
field - Indicates the column name in the database table.public OrmPredicates isNotNull(String field)
null.
This method is similar to is not null of the SQL statement.
field - Indicates the column name in the database table.public OrmPredicates like(String field, String value)
String and value is
similar to a specified string.
This method is similar to like of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates. The percent sign (%) in the value
is a wildcard (like * in a regular expression).public OrmPredicates glob(String field, String value)
public OrmPredicates between(String field, int low, int high)
int and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, long low, long high)
long and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, double low, double high)
double and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, float low, float high)
float and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, Date low, Date high)
Date and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, Time low, Time high)
Time and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, Timestamp low, Timestamp high)
Timestamp and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, Calendar low, Calendar high)
Calendar and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates between(String field, String low, String high)
String and value
is within a given range.
This method is similar to between of the SQL statement.
field - Indicates the column name in the database table.low - Indicates the minimum value to match with the predicates.high - Indicates the maximum value to match with the predicates.public OrmPredicates notBetween(String field, int low, int high)
OrmPredicates to match the specified field whose data type is int and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, long low, long high)
OrmPredicates to match the specified field whose data type is long and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, double low, double high)
OrmPredicates to match the specified field whose data type is double and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, float low, float high)
OrmPredicates to match the specified field whose data type is float and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, Date low, Date high)
OrmPredicates to match the specified field whose data type is Date and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, Time low, Time high)
OrmPredicates to match the specified field whose data type is Time and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, Timestamp low, Timestamp high)
OrmPredicates to match the specified field whose data type is Timestamp and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, Calendar low, Calendar high)
OrmPredicates to match the specified field whose data type is Calendar and value is out of a
given range.field - Indicates the column name in the database table.low - Indicates the minimum value to match with OrmPredicates.high - Indicates the maximum value to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notBetween(String field, String low, String high)
public OrmPredicates greaterThan(String field, int value)
int and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, long value)
long and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, double value)
double and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, float value)
float and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, Date value)
Date and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, Time value)
Time and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, Timestamp value)
Timestamp and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, Calendar value)
Calendar and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThan(String field, String value)
String and value is
greater than a specified value.
This method is similar to > of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, int value)
int and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, long value)
long and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, double value)
double and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, float value)
float and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, Date value)
Date and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, Time value)
Time and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, Timestamp value)
Timestamp and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, Calendar value)
Calendar and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThan(String field, String value)
String and value
is less than a specified value.
This method is similar to < of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, int value)
int and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, long value)
long and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, double value)
double and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, float value)
float and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, Date value)
Date and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, Time value)
Time and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, Timestamp value)
Timestamp and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, Calendar value)
Calendar and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates greaterThanOrEqualTo(String field, String value)
String and value is
greater than or equal to a specified value.
This method is similar to >= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, int value)
int and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, long value)
long and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, double value)
double and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, float value)
float and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, Date value)
Date and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, Time value)
Time and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, Timestamp value)
Timestamp and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, Calendar value)
Calendar and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates lessThanOrEqualTo(String field, String value)
String and value
is less than or equal to a specified value.
This method is similar to <= of the SQL statement.
field - Indicates the column name in the database table.value - Indicates the value to match with the predicates.public OrmPredicates orderByAsc(String field)
This method is similar to order by field asc of the SQL statement.
field - Indicates the column name in the database table.public OrmPredicates orderByDesc(String field)
This method is similar to order by field desc of the SQL statement.
field - Indicates the column name in the database table.public OrmPredicates distinct()
This method is similar to distinct of the SQL statement.
public OrmPredicates limit(int value)
This method is similar to limit of the SQL statement.
value - Indicates the maximum number of data records.public OrmPredicates offset(int rowOffset)
OrmPredicates to specify the start position of the returned result.
Use this method together with OrmPredicates#limit(int).
rowOffset - Indicates the start position of the returned result. The value is a positive integer.RdbPredicates with the specified start position of the returned result.limit(int)public OrmPredicates groupBy(String[] fields)
OrmPredicates to group query results by specified columns.fields - Indicates the specified columns by which query results are grouped.OrmPredicates with the specified columns by which query results are grouped.public OrmPredicates indexedBy(String indexName)
OrmPredicates to specify the index column.
before using this method, you need to create an index column.
indexName - Indicates the name of the index column.OrmPredicates with the specified index column.public OrmPredicates in(String field, int[] values)
OrmPredicates to match the specified field whose data type is int array and values are
within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, long[] values)
OrmPredicates to match the specified field whose data type is long array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, double[] values)
OrmPredicates to match the specified field whose data type is double array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, float[] values)
OrmPredicates to match the specified field whose data type is float array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, Date[] values)
OrmPredicates to match the specified field whose data type is Date array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, Time[] values)
OrmPredicates to match the specified field whose data type is Time array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, Timestamp[] values)
OrmPredicates to match the specified field whose data type is Timestamp array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, Calendar[] values)
OrmPredicates to match the specified field whose data type is Calendar array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates in(String field, String[] values)
OrmPredicates to match the specified field whose data type is String array and values
are within a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, int[] values)
OrmPredicates to match the specified field whose data type is int array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, long[] values)
OrmPredicates to match the specified field whose data type is long array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, double[] values)
OrmPredicates to match the specified field whose data type is double array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, float[] values)
OrmPredicates to match the specified field whose data type is float array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, Date[] values)
OrmPredicates to match the specified field whose data type is Date array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, Time[] values)
OrmPredicates to match the specified field whose data type is Time array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, Timestamp[] values)
OrmPredicates to match the specified field whose data type is Timestamp array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, Calendar[] values)
OrmPredicates to match the specified field whose data type is Calendar array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public OrmPredicates notIn(String field, String[] values)
OrmPredicates to match the specified field whose data type is String array and values
are out of a given range.field - Indicates the column name in the database table.values - Indicates the values to match with OrmPredicates.OrmPredicates that matches the specified field.public <J extends OrmObject> OrmPredicates crossJoin(Class<J> clz)
cross join condition to a SQL statement.
In SQLite, you can use cross joins to associate two unrelated tables. The cross join joins every row from the first table with every row from the second table, and the result set is the product of rows in both tables. Exercise caution when using cross joins during application development because they will exert heavy load on memory and subsequent data processing.
clz - Indicates the names of the class to join.cross join condition.public <J extends OrmObject> OrmPredicates innerJoin(Class<J> clz)
inner join condition to a SQL statement.
In SQLite, you can use inner joins to query data from two related tables. The inner join selects all the rows
to display in the result set from the related tables only if both tables meet the conditions specified in
the ON clause. The inner joins are syntactically equivalent to the cross joins. Note that inner joins must be
used together with OrmPredicates#on(String...).
Otherwise, use OrmPredicates#crossJoin instead.
clz - Indicates the names of the class to join.inner join condition.public <J extends OrmObject> OrmPredicates leftOuterJoin(Class<J> clz)
left outer join condition to a SQL statement.
The left join or left outer join allows you to query data from tables A and B and returns the inner joins between A and B and the unmatched rows of A. A is the first join defined in the clause, and is therefore left join.
clz - Indicates the names of the class to join.left outer join condition.public OrmPredicates using(String... fields)
using condition to the predicate. This method is similar to using of the SQL statement.
using is the abbreviation of the specified join condition in the left join
OrmPredicates#leftOuterJoin or inner join OrmPredicates#innerJoin.
When adding the using condition, ensure that the specified columns exist in both tables.
fields - Indicates the column names in the database table.using condition.IllegalPredicateException - You must handle this exception by yourself.IllegalStateException - You must handle this exception by yourself.public OrmPredicates on(String... clauses)
on condition to the predicate.
on is used to set the join conditions of multiple tables when obtaining the join type. It is used
with the left join OrmPredicates#leftOuterJoin or inner join OrmPredicates#innerJoin.
clauses - Indicates the conditions of the join clauses.on condition.IllegalPredicateException - You must handle this exception by yourself.IllegalStateException - You must handle this exception by yourself.