Package org.redisson.api.condition
Class Conditions
- java.lang.Object
-
- org.redisson.api.condition.Conditions
-
public final class Conditions extends Object
Conditions factory to search for Live Objects by fields.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Condition
and(Condition... conditions)
Returns "AND" condition for collection of nestedconditions
static Condition
eq(String name, Object value)
Returns "EQUALS" condition which restricts property byname
to definedvalue
static Condition
ge(String name, Number value)
Returns "GREATER THAN ON EQUAL" condition which restricts property byname
to definedvalue
static Condition
gt(String name, Number value)
Returns "GREATER THAN" condition which restricts property byname
to definedvalue
static Condition
in(String name, Object... values)
Returns "IN" condition for property byname
and allowed set ofvalues
static Condition
in(String name, Collection<?> values)
Returns "IN" condition for property byname
and allowed set ofvalues
static Condition
le(String name, Number value)
Returns "LESS THAN ON EQUAL" condition which restricts property byname
to definedvalue
static Condition
lt(String name, Number value)
Returns "LESS THAN" condition which restricts property byname
to definedvalue
static Condition
or(Condition... conditions)
Returns "OR" condition for collection of nestedconditions
-
-
-
Method Detail
-
in
public static Condition in(String name, Object... values)
Returns "IN" condition for property byname
and allowed set ofvalues
- Parameters:
name
- - name of propertyvalues
- - array of allowed values- Returns:
- condition
-
in
public static Condition in(String name, Collection<?> values)
Returns "IN" condition for property byname
and allowed set ofvalues
- Parameters:
name
- - name of propertyvalues
- - collection of allowed values- Returns:
- condition
-
eq
public static Condition eq(String name, Object value)
Returns "EQUALS" condition which restricts property byname
to definedvalue
- Parameters:
name
- - name of propertyvalue
- - defined value- Returns:
- condition
-
or
public static Condition or(Condition... conditions)
Returns "OR" condition for collection of nestedconditions
- Parameters:
conditions
- - nested condition objects- Returns:
- condition
-
and
public static Condition and(Condition... conditions)
Returns "AND" condition for collection of nestedconditions
- Parameters:
conditions
- - nested condition objects- Returns:
- condition
-
gt
public static Condition gt(String name, Number value)
Returns "GREATER THAN" condition which restricts property byname
to definedvalue
- Parameters:
name
- - name of propertyvalue
- - defined value- Returns:
- condition
-
lt
public static Condition lt(String name, Number value)
Returns "LESS THAN" condition which restricts property byname
to definedvalue
- Parameters:
name
- - name of propertyvalue
- - defined value- Returns:
- condition
-
ge
public static Condition ge(String name, Number value)
Returns "GREATER THAN ON EQUAL" condition which restricts property byname
to definedvalue
- Parameters:
name
- - name of propertyvalue
- - defined value- Returns:
- condition
-
-