Package de.espirit.or.query
Class In
java.lang.Object
de.espirit.or.query.AbstractConstraint
de.espirit.or.query.Compare
de.espirit.or.query.In
- All Implemented Interfaces:
AttributeConstraint
,Constraint
,Serializable
,Cloneable
Constraint representing the IN operator. This constraint expects an
Iterable<Object>
as value.- Since:
- 4.0.17
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.or.query.Constraint
Constraint.Type
-
Constructor Summary
ConstructorDescriptionCreates a new In constraint for the attribute specified by given attributeName and parameter.
Attention: Ensure to set anIterable<Object>
as parameter value inSelect.setParameter(String,Object)
Creates a new In constraint for the attribute specified by given attributeName and with the given value. -
Method Summary
Modifier and TypeMethodDescriptiongetType()
The type of this constraint:Constraint.Type.IN
boolean
isEmpty()
Check if this is an empty constraint.Methods inherited from class de.espirit.or.query.Compare
getParameter, getValue, setParameter, setValue
Methods inherited from class de.espirit.or.query.AbstractConstraint
getAttributeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.espirit.or.query.AttributeConstraint
getAttributeName
-
Constructor Details
-
In
Creates a new In constraint for the attribute specified by given attributeName and parameter.
Attention: Ensure to set anIterable<Object>
as parameter value inSelect.setParameter(String,Object)
- Since:
- 4.0.17
- See Also:
-
In
Creates a new In constraint for the attribute specified by given attributeName and with the given value.- Since:
- 5.0.100
- See Also:
-
-
Method Details
-
isEmpty
public boolean isEmpty()Check if this is an empty constraint. Empty constraints could be omitted without changing the query result.- Specified by:
isEmpty
in interfaceConstraint
- Overrides:
isEmpty
in classAbstractConstraint
- Returns:
true
if the constraint is empty, i.e. removing the constraint would not change the query result.- Since:
- 5.0.102
-
getType
The type of this constraint:Constraint.Type.IN
- Specified by:
getType
in interfaceConstraint
- Specified by:
getType
in classAbstractConstraint
- Returns:
- the type of this constraint.
- Since:
- 4.0.17
-