Module is.codion.framework.domain
Interface ConditionType
public interface ConditionType
Defines a custom condition type.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConditionTypeconditionType(EntityType entityType, String name) Instantiates a newConditionTypefor the given entity typeget()<T> CustomCondition<T> CustomConditionname()
-
Method Details
-
entityType
EntityType entityType()- Returns:
- the entity type
-
name
String name()- Returns:
- the name
-
get
CustomCondition get()- Returns:
- a
CustomConditioninstance - See Also:
-
get
Returns a
CustomConditionbased on theConditionProviderassociated with thisConditionTypeThis method assumes that the
ConditionProvideris not based on any columns or has no need for them when creating the condition string.Note that
ConditionProvider.toString(List, List)will receive an empty column list.- Parameters:
values- the values used by this condition- Returns:
- a
CustomConditioninstance - See Also:
-
get
- Type Parameters:
T- the column type- Parameters:
column- the column representing the value used by this conditionvalue- the value used by this condition string- Returns:
- a
CustomConditioninstance - See Also:
-
get
- Type Parameters:
T- the column type- Parameters:
column- the column representing the values used by this condition, assuming all the values are for the same columnvalues- the values used by this condition string- Returns:
- a
CustomConditioninstance - See Also:
-
get
- Parameters:
columns- the columns representing the values used by this condition, in the same order as their respective valuesvalues- the values used by this condition string in the same order as their respective columns- Returns:
- a
CustomConditioninstance - Throws:
IllegalArgumentException- in case the number of columns does not match the number of values- See Also:
-
conditionType
Instantiates a newConditionTypefor the given entity type- Parameters:
entityType- the entityTypename- the name- Returns:
- a new condition type
-