Class In
java.lang.Object
org.springframework.data.relational.core.sql.In
- All Implemented Interfaces:
Condition
,Expression
,Segment
,Visitable
IN
Condition
clause.- Since:
- 1.1
- Author:
- Jens Schauder, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic In
create
(Expression columnOrExpression, Collection<? extends Expression> expressions) static In
create
(Expression columnOrExpression, Expression arg) static In
create
(Expression columnOrExpression, Expression... expressions) static In
createNotIn
(Expression columnOrExpression, Collection<? extends Expression> expressions) static In
createNotIn
(Expression columnOrExpression, Expression arg) static In
createNotIn
(Expression columnOrExpression, Expression... expressions) boolean
boolean
int
hashCode()
Generate a hash code from thisSegment
.boolean
isNotIn()
not()
toString()
Return a SQL string representation of thisSegment
.void
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
create
- Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.arg
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
create
public static In create(Expression columnOrExpression, Collection<? extends Expression> expressions) - Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.expressions
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
create
- Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.expressions
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
createNotIn
- Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.arg
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
createNotIn
public static In createNotIn(Expression columnOrExpression, Collection<? extends Expression> expressions) - Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.expressions
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
createNotIn
- Parameters:
columnOrExpression
- left hand side of theCondition
must not be null.expressions
- right hand side (collectionExpression
) must not be null.- Returns:
- the
In
Condition
.
-
not
Description copied from interface:Condition
-
hasExpressions
public boolean hasExpressions()- Returns:
true
if this condition has at least one expression.- Since:
- 2.1
-
toString
Description copied from interface:Segment
Return a SQL string representation of thisSegment
.The representation is intended for debugging purposes and an approximation to the generated SQL. While it might work in the context of a specific dialect, you should not assume that the
Segment.toString()
representation works across multiple databases. -
isNotIn
public boolean isNotIn() -
visit
Description copied from interface:Visitable
-
hashCode
public int hashCode()Description copied from interface:Segment
Generate a hash code from thisSegment
.Hashcode typically derives from the
Segment.toString()
representation so twoSegment
s yield the sameSegment.hashCode()
if theirSegment.toString()
representation matches. -
equals
Description copied from interface:Segment
Check whether thisSegment
is equal to anotherSegment
.Equality is typically given if the
Segment.toString()
representation matches.
-