public final class Conditions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Condition.Set |
conditionSet(Conjunction conjunction)
Initializes a new
Condition.Set instance |
static Condition.Set |
conditionSet(Conjunction conjunction,
java.util.Collection<Condition> condition)
Initializes a new
Condition.Set instance |
static Condition.Set |
conditionSet(Conjunction conjunction,
Condition... conditions)
Initializes a new
Condition.Set instance |
static Condition.CustomCondition |
customCondition(java.lang.String conditionId)
Creates a new
Condition.CustomCondition based on the condition with the given id |
static Condition.CustomCondition |
customCondition(java.lang.String conditionId,
java.util.List<java.lang.String> propertyIds,
java.util.List values)
Creates a new
Condition.CustomCondition based on the condition with the given id |
static EntityCondition |
entityCondition(Entity.Key key)
Creates a
EntityCondition instance specifying the entity of the type identified by key |
static EntityCondition |
entityCondition(java.util.List<Entity.Key> keys)
Creates a condition based on the given primary keys, it is assumed they are all of the same type
|
static EntityCondition |
entityCondition(java.lang.String entityId)
Creates a
EntitySelectCondition instance specifying all entities of the type identified by entityId |
static EntityCondition |
entityCondition(java.lang.String entityId,
Condition condition)
Creates a
EntityCondition instance specifying the entities of the type identified by key,
using the given Condition |
static EntityCondition |
entityCondition(java.lang.String entityId,
java.lang.String propertyId,
ConditionType conditionType,
java.lang.Object value)
Creates a
EntityCondition instance for specifying entities of the type identified by entityId
with a where condition based on the property identified by propertyId, the operators based on
conditionType and value. |
static EntitySelectCondition |
entitySelectCondition(Entity.Key key)
Creates a
EntitySelectCondition instance for selecting the entity with the given key |
static EntitySelectCondition |
entitySelectCondition(java.util.List<Entity.Key> keys)
Creates a
EntitySelectCondition instance for selecting the entities with the given keys,
it is assumed they are all of the same type |
static EntitySelectCondition |
entitySelectCondition(java.lang.String entityId)
Creates a
EntitySelectCondition instance for selecting all entities of the type identified by entityId |
static EntitySelectCondition |
entitySelectCondition(java.lang.String entityId,
Condition condition)
Creates a
EntitySelectCondition instance for selecting entities of the type identified by entityId,
using the given Condition |
static EntitySelectCondition |
entitySelectCondition(java.lang.String entityId,
java.lang.String propertyId,
ConditionType conditionType,
java.lang.Object value)
Creates a
EntitySelectCondition instance for selecting entities of the type identified by entityId
with a where condition based on the property identified by propertyId, the operators based on
conditionType and value. |
static Condition.PropertyCondition |
propertyCondition(java.lang.String propertyId,
ConditionType conditionType,
java.lang.Object value)
Creates a
Condition for the given property, with the operator specified by the conditionType
and value. |
static Condition.PropertyCondition |
propertyCondition(java.lang.String propertyId,
ConditionType conditionType,
java.lang.Object value,
boolean caseSensitive)
Creates a
Condition for the given property, with the operator specified by the conditionType
and value. |
public static EntityCondition entityCondition(Entity.Key key)
EntityCondition instance specifying the entity of the type identified by keykey - the primary keypublic static EntityCondition entityCondition(java.lang.String entityId, Condition condition)
EntityCondition instance specifying the entities of the type identified by key,
using the given ConditionentityId - the entity IDcondition - the column conditionpublic static EntityCondition entityCondition(java.util.List<Entity.Key> keys)
keys - the primary keyspublic static EntityCondition entityCondition(java.lang.String entityId)
EntitySelectCondition instance specifying all entities of the type identified by entityIdentityId - the entity IDpublic static EntityCondition entityCondition(java.lang.String entityId, java.lang.String propertyId, ConditionType conditionType, java.lang.Object value)
EntityCondition instance for specifying entities of the type identified by entityId
with a where condition based on the property identified by propertyId, the operators based on
conditionType and value. Note that value may be a single value, a Collection
of values or null.entityId - the entity IDpropertyId - the property IDconditionType - the search typevalue - the condition value, can be a Collection of valuespublic static EntitySelectCondition entitySelectCondition(Entity.Key key)
EntitySelectCondition instance for selecting the entity with the given keykey - the keypublic static EntitySelectCondition entitySelectCondition(java.util.List<Entity.Key> keys)
EntitySelectCondition instance for selecting the entities with the given keys,
it is assumed they are all of the same typekeys - the keyspublic static EntitySelectCondition entitySelectCondition(java.lang.String entityId)
EntitySelectCondition instance for selecting all entities of the type identified by entityIdentityId - the entity IDpublic static EntitySelectCondition entitySelectCondition(java.lang.String entityId, Condition condition)
EntitySelectCondition instance for selecting entities of the type identified by entityId,
using the given ConditionentityId - the entity IDcondition - the column conditionpublic static EntitySelectCondition entitySelectCondition(java.lang.String entityId, java.lang.String propertyId, ConditionType conditionType, java.lang.Object value)
EntitySelectCondition instance for selecting entities of the type identified by entityId
with a where condition based on the property identified by propertyId, the operators based on
conditionType and value. Note that value may be a single value, a Collection
of values or null.entityId - the entity IDpropertyId - the property IDconditionType - the condition typevalue - the condition value, can be a Collection of valuespublic static Condition.Set conditionSet(Conjunction conjunction)
Condition.Set instanceconjunction - the Conjunction to useCondition.Set instancepublic static Condition.Set conditionSet(Conjunction conjunction, Condition... conditions)
Condition.Set instanceconjunction - the Conjunction to useconditions - the Condition objects to be included in this setCondition.Set instancepublic static Condition.Set conditionSet(Conjunction conjunction, java.util.Collection<Condition> condition)
Condition.Set instanceconjunction - the conjunction to usecondition - the Condition objects to be included in this setCondition.Set instancepublic static Condition.CustomCondition customCondition(java.lang.String conditionId)
Condition.CustomCondition based on the condition with the given idconditionId - the id of the conditionjava.lang.NullPointerException - in case the condition idEntity.Definition.Builder#addConditionProvider(String, Entity.ConditionProvider)public static Condition.CustomCondition customCondition(java.lang.String conditionId, java.util.List<java.lang.String> propertyIds, java.util.List values)
Condition.CustomCondition based on the condition with the given idconditionId - the id of the conditionpropertyIds - the properties representing the values used by this condition, in the same order as their respective valuesvalues - the values used by this condition stringjava.lang.NullPointerException - in case any of the parameters are nullEntity.Definition.Builder#addConditionProvider(String, Entity.ConditionProvider)public static Condition.PropertyCondition propertyCondition(java.lang.String propertyId, ConditionType conditionType, java.lang.Object value)
Condition for the given property, with the operator specified by the conditionType
and value. Note that value may be a single value, a Collection of values or null.propertyId - the propertyconditionType - the search typevalue - the condition value, can be a Collection of valuespublic static Condition.PropertyCondition propertyCondition(java.lang.String propertyId, ConditionType conditionType, java.lang.Object value, boolean caseSensitive)
Condition for the given property, with the operator specified by the conditionType
and value. Note that value may be a single value, a Collection of values or null.propertyId - the propertyconditionType - the search typevalue - the condition value, can be a Collection of valuescaseSensitive - true if the condition should be case sensitive, only applicable to string properties