public class ObjectFilter extends Object
| Constructor and Description |
|---|
ObjectFilter() |
| Modifier and Type | Method and Description |
|---|---|
static Group |
and(Criteria... expressions) |
static Criterion |
between(Class clazz,
Object name,
String svalue,
String svalue2) |
static Criterion |
between(Object name,
Object value,
Object value2) |
static Criterion |
betweenByte(Object name,
byte start,
byte stop) |
static Criterion |
betweenChar(Object name,
char start,
char stop) |
static Criterion |
betweenDouble(Object name,
double start,
double stop) |
static Criterion |
betweenFloat(Object name,
float start,
float stop) |
static Criterion |
betweenInt(Object name,
int start,
int stop) |
static Criterion |
betweenLong(Object name,
long start,
long stop) |
static Criterion |
betweenShort(Object name,
short start,
short stop) |
static Criterion |
contains(Object name,
Object value) |
static Criteria |
createCriteria(String name,
Operator operator,
TypeType type,
Class<Object> classType,
List<?> values)
Make criteria configurable
|
static Criteria |
createCriteriaFromClass(String name,
Class<?> cls,
Operator operator,
List<?> values)
Make criteria configurable
|
static Criteria |
criteriaFromJson(String json)
Converts a JSON string into a Criteria.
|
static Criteria |
criteriaFromList(List<?> list)
Creates criteria from a list.
|
static Criterion |
empty(Object name) |
static Criterion |
endsWith(Object name,
Object value) |
static Criterion |
eq(Object name,
Object value) |
static Criterion |
eqBoolean(Object name,
boolean compareValue) |
static Criterion |
eqByte(Object name,
byte compareValue) |
static Criterion |
eqChar(Object name,
char compareValue) |
static Criterion |
eqDouble(Object name,
double compareValue) |
static Criterion |
eqFloat(Object name,
float compareValue) |
static Criterion |
eqInt(Object name,
int compareValue) |
static Criterion |
eqLong(Object name,
long compareValue) |
static Criterion |
eqShort(Object name,
short compareValue) |
static <T> List<T> |
filter(Collection<T> items,
Criteria... exp) |
static <T> List<T> |
filter(Collection<T> items,
List<Criteria> expressions) |
static Criterion |
gt(Object name,
Object value) |
static Criterion |
gtByte(Object name,
byte compareValue) |
static Criterion |
gtChar(Object name,
char compareValue) |
static Criterion |
gtDouble(Object name,
double compareValue) |
static Criterion |
gte(Object name,
Object value) |
static Criterion |
gteByte(Object name,
byte compareValue) |
static Criterion |
gteChar(Object name,
char compareValue) |
static Criterion |
gteDouble(Object name,
double compareValue) |
static Criterion |
gteFloat(Object name,
float compareValue) |
static Criterion |
gteInt(Object name,
int compareValue) |
static Criterion |
gteLong(Object name,
long compareValue) |
static Criterion |
gteShort(Object name,
short compareValue) |
static Criterion |
gtFloat(Object name,
float compareValue) |
static Criterion |
gtInt(Object name,
int compareValue) |
static Criterion |
gtLong(Object name,
long compareValue) |
static Criterion |
gtShort(Object name,
short compareValue) |
static Criterion |
implementsInterface(Class<?> cls) |
static Criterion |
in(Object name,
Object... values) |
static Criterion |
inBytes(Object name,
byte... compareValues) |
static Criterion |
inChars(Object name,
char... compareValues) |
static Criterion |
inDoubles(Object name,
double... compareValues) |
static Criterion |
inFloats(Object name,
float... compareValues) |
static Criterion |
inInts(Object name,
int... compareValues) |
static Criterion |
inLongs(Object name,
long... compareValues) |
static Criterion |
inShorts(Object name,
short... compareValues) |
static Criterion |
instanceOf(Class<?> cls) |
static Criterion |
isNull(Object name) |
static Criterion |
lt(Object name,
Object value) |
static Criterion |
ltByte(Object name,
byte compareValue) |
static Criterion |
ltChar(Object name,
char compareValue) |
static Criterion |
ltDouble(Object name,
double compareValue) |
static Criterion |
lte(Object name,
Object value) |
static Criterion |
lteByte(Object name,
byte compareValue) |
static Criterion |
lteChar(Object name,
char compareValue) |
static Criterion |
lteDouble(Object name,
double compareValue) |
static Criterion |
lteFloat(Object name,
float compareValue) |
static Criterion |
lteInt(Object name,
int compareValue) |
static Criterion |
lteLong(Object name,
long compareValue) |
static Criterion |
lteShort(Object name,
short compareValue) |
static Criterion |
ltFloat(Object name,
float compareValue) |
static Criterion |
ltInt(Object name,
int compareValue) |
static Criterion |
ltLong(Object name,
long compareValue) |
static Criterion |
ltShort(Object name,
short compareValue) |
static boolean |
matches(Object obj,
Criteria... exp)
Does the object match this expression.
|
static boolean |
matches(Object obj,
List<Criteria> expressions) |
static boolean |
matches(Object obj,
Predicate exp)
Does the object match this predicate
|
static Not |
not(Criteria expression) |
static Criterion |
notContains(Object name,
Object value) |
static Criterion |
notEmpty(Object name) |
static Criterion |
notEq(Object name,
Object value) |
static Criterion |
notEqBoolean(Object name,
boolean compareValue) |
static Criterion |
notEqByte(Object name,
byte compareValue) |
static Criterion |
notEqChar(Object name,
char compareValue) |
static Criterion |
notEqDouble(Object name,
double compareValue) |
static Criterion |
notEqFloat(Object name,
float compareValue) |
static Criterion |
notEqInt(Object name,
int compareValue) |
static Criterion |
notEqLong(Object name,
long compareValue) |
static Criterion |
notEqShort(Object name,
short compareValue) |
static Criterion |
notIn(Object name,
Object... values)
This has to convert values to field type.
|
static Criterion |
notInBytes(Object name,
byte... compareValues) |
static Criterion |
notInChars(Object name,
char... compareValues) |
static Criterion |
notInDoubles(Object name,
double... compareValues) |
static Criterion |
notInFloats(Object name,
float... compareValues) |
static Criterion |
notInInts(Object name,
int... compareValues) |
static Criterion |
notInLongs(Object name,
long... compareValues) |
static Criterion |
notInShorts(Object name,
short... compareValues) |
static Criterion |
notNull(Object name) |
static Group |
or(Criteria... expressions) |
static Criterion |
startsWith(Object name,
Object value) |
static Criterion |
typeOf(String className) |
public static boolean matches(Object obj, Criteria... exp)
obj - object in questionexp - expressionpublic static boolean matches(Object obj, Predicate exp)
obj - object in questionexp - predicatepublic static <T> List<T> filter(Collection<T> items, List<Criteria> expressions)
public static <T> List<T> filter(Collection<T> items, Criteria... exp)
public static Criterion notIn(Object name, Object... values)
public static Criteria createCriteria(String name, Operator operator, TypeType type, Class<Object> classType, List<?> values)
operator - type - values - public static Criteria createCriteriaFromClass(String name, Class<?> cls, Operator operator, List<?> values)
operator - values - public static Criteria criteriaFromList(List<?> list)
list - list to configure a single criteriaCopyright © 2015. All Rights Reserved.