Class Column
java.lang.Object
org.springframework.data.relational.core.sql.Column
- All Implemented Interfaces:
Expression, Named, Segment, Visitable
Column name within a
SELECT … FROM clause.
Renders to: <name> or <table(alias)>.<name>.
- Since:
- 1.1
- Author:
- Mark Paluch, Jens Schauder
-
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnCreates a new aliasedColumn.as(SqlIdentifier alias) Creates a new aliasedColumn.between(Expression begin, Expression end) Creates aBETWEENCondition.static Columnstatic Columncreate(SqlIdentifier name, Table table) booleangetName()@Nullable TableLikegetTable()inthashCode()Generate a hash code from thisSegment.in(Expression... expression) isEqualTo(Expression expression) Creates a=(equals)Condition.isGreater(Expression expression) Creates a!=(not equals)Condition.isGreaterOrEqualTo(Expression expression) Creates a<=(greater or equal to)Condition.isLess(Expression expression) Creates a<(less)Condition.isLessOrEqualTo(Expression expression) CCreates a<=(greater)Condition.isNotEqualTo(Expression expression) Creates a!=(not equals)Condition.Creates aIS NOT NULLcondition.isNull()Creates aIS NULLcondition.like(Expression expression) Creates aLIKECondition.notBetween(Expression begin, Expression end) Creates aNOT BETWEENCondition.notIn(Expression... expression) notLike(Expression expression) Creates aNOT LIKECondition.set(Expression value) Creates a valueassignment.toString()Return a SQL string representation of thisSegment.void
-
Method Details
-
create
-
create
-
aliased
-
as
-
as
-
from
-
isEqualTo
Creates a=(equals)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
isNotEqualTo
Creates a!=(not equals)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
between
-
notBetween
-
isLess
Creates a<(less)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
isLessOrEqualTo
CCreates a<=(greater)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
isGreater
Creates a!=(not equals)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
isGreaterOrEqualTo
Creates a<=(greater or equal to)Condition.- Parameters:
expression- right side of the comparison.- Returns:
- the
Comparisoncondition.
-
like
-
notLike
-
in
- Parameters:
expression- right side of the comparison.- Returns:
- the
Incondition.
-
in
-
notIn
- Parameters:
expression- right side of the comparison.- Returns:
- the
Incondition.
-
notIn
-
isNull
-
isNotNull
-
set
Creates a valueassignment.- Parameters:
value- the value to assign.- Returns:
- the
AssignValueassignment.
-
getName
-
getReferenceName
-
getTable
-
getRequiredTable
- Returns:
- the required
Table, throwsIllegalStateExceptionif the column was not referenced in the context of aTable. - Throws:
IllegalStateException- if the column was not referenced in the context of aTable.- Since:
- 4.0
-
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. -
equals
Description copied from interface:SegmentCheck whether thisSegmentis equal to anotherSegment.Equality is typically given if the
Segment.toString()representation matches. -
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. -
visit
-