T - public class DBPermittedRangeOperator<T> extends DBOperator
Given a set of 1,2,3,4,5, using DBPermittedRangeExclusiveOperator(1,5) will produce an operation such that 1, 2, 3, and 4 will be returned, but not 5.
Unbounded ranges are created by passing null as the lower- or upper-bound. For example, DBPermittedRangeExclusiveOperator(1,null) will produce an operation such that every number larger than 1 will be returned.
Support DBvolution at Patreon
| Modifier and Type | Field and Description |
|---|---|
protected DBOperator |
operator |
| Constructor and Description |
|---|
DBPermittedRangeOperator(T lowerBound,
T upperBound)
Implements a BETWEEN operator that includes the beginning of the range but
excludes the end.
|
| Modifier and Type | Method and Description |
|---|---|
DBOperator |
copyAndAdapt(QueryableDatatypeSyncer.DBSafeInternalQDTAdaptor typeAdaptor)
Adds TypeAdaptor support to DBOperator.
|
BooleanExpression |
generateWhereExpression(DBDefinition db,
DBExpression column)
Create the expression to be used in the query generation.
|
void |
invertOperator(Boolean invertOperator)
Make this operator an exclusive rather than inclusive comparison.
|
void |
not()
Make this operator an exclusive rather than inclusive comparison.
|
equals, getFirstValue, getSecondValue, getThirdValue, hashCode, includeNulls, setFirstValue, setSecondValue, setThirdValueprotected DBOperator operator
public DBPermittedRangeOperator(T lowerBound, T upperBound)
Use a null value to create open or unbounded ranges.
lowerBound - the smallest value of the desired rangeupperBound - the smallest value larger than the desired rangepublic DBOperator copyAndAdapt(QueryableDatatypeSyncer.DBSafeInternalQDTAdaptor typeAdaptor)
DBOperatorcopyAndAdapt in class DBOperatortypeAdaptor - Support DBvolution at Patreon
public BooleanExpression generateWhereExpression(DBDefinition db, DBExpression column)
DBOperatorgenerateWhereExpression in class DBOperatorcolumn - Support DBvolution at Patreon
public void invertOperator(Boolean invertOperator)
DBOperatorBasically switches the operator from, for instance, "==" to "!=".
invertOperator in class DBOperatorpublic void not()
DBOperatorBasically switches the operator from, for instance, "==" to "!=".
not in class DBOperatorCopyright © 2017. All Rights Reserved.