java.lang.Object
org.springframework.data.relational.core.sql.Between
- All Implemented Interfaces:
Condition,Expression,Segment,Visitable
BETWEEN
Condition comparing between Expressions.
Results in a rendered condition: <left> BETWEEN <begin> AND <end>.
- Since:
- 2.2
- Author:
- Mark Paluch, Meng Zuozhu
-
Method Summary
Modifier and TypeMethodDescriptionstatic Betweencreate(Expression columnOrExpression, Expression begin, Expression end) booleangetBegin()getEnd()inthashCode()Generate a hash code from thisSegment.booleannot()toString()Return a SQL string representation of thisSegment.voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
create
- Parameters:
columnOrExpression- left side of the comparison.begin- begin value of the comparison.end- end value of the comparison.- Returns:
- the
Betweencondition.
-
getColumn
- Returns:
- the column
Expression.
-
getBegin
- Returns:
- the begin
Expression.
-
getEnd
- Returns:
- the end
Expression.
-
isNegated
public boolean isNegated() -
not
Description copied from interface:Condition -
toString
Description copied from interface:SegmentReturn 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. -
visit
Description copied from interface:Visitable -
hashCode
public int hashCode()Description copied from interface:SegmentGenerate a hash code from thisSegment.Hashcode typically derives from the
Segment.toString()representation so twoSegments yield the sameSegment.hashCode()if theirSegment.toString()representation matches. -
equals
Description copied from interface:SegmentCheck whether thisSegmentis equal to anotherSegment.Equality is typically given if the
Segment.toString()representation matches.
-