public class Operator extends Object
Operator
type supports the generation of SQL statements
that specify the various comparisons allowed in SQL where clauses.
There are no instances for the SQL operators "IS NULL", "IS NOT NULL",
"IN", or "NOT IN". However, all those SQL operations are supported
by the Where
class.
Rather than specifying an Operator
, directly call
the isNull()
, isNotNull()
, or the correct
variant of the in()
or notIn()
method
as appropriate.
Modifier and Type | Field and Description |
---|---|
static Operator |
EQUALS
An instance that represents the equality ('=') operator.
|
static Operator |
GREATER_THAN
An instance that represents the greater than ('>') operator.
|
static Operator |
GREATER_THAN_OR_EQUALS
An instance that represents the greater than or equals ('>=') operator.
|
static Operator |
LESS_THAN
An instance that represents the less than ('<') operator.
|
static Operator |
LESS_THAN_OR_EQUALS
An instance that represents the less than or equals ('<=') operator.
|
static Operator |
LIKE
An instance that represents the 'LIKE' operator to be used
for string fields.
|
static Operator |
NOT_EQUALS
An instance that represents the inequality ('<>') operator.
|
static Operator |
NOT_LIKE
An instance that represents the 'NOT LIKE' operator to be used
for string fields.
|
Modifier and Type | Method and Description |
---|---|
String |
getSqlString()
Returns the text to be inserted in the SQL statement being built.
|
public static final Operator EQUALS
public static final Operator NOT_EQUALS
public static final Operator LIKE
public static final Operator NOT_LIKE
public static final Operator LESS_THAN
public static final Operator LESS_THAN_OR_EQUALS
public static final Operator GREATER_THAN
public static final Operator GREATER_THAN_OR_EQUALS
public String getSqlString()
Copyright © 2019. All rights reserved.