java.lang.Object
org.springframework.data.relational.core.sql.Table
Represents a table reference within a SQL statement. Typically, used to denote
FROM or JOIN or to
prefix a Column.
Renders to: <name> or <name> AS <name>.
- Since:
- 1.1
- Author:
- Mark Paluch, Jens Schauder
-
Method Summary
Modifier and TypeMethodDescriptionstatic TableCreates a newTableusing analias.Creates a newTablealiased toalias.as(SqlIdentifier alias) Creates a newTablealiased toalias.static TableCreates a newTablegivenname.static Tablecreate(SqlIdentifier name) Creates a newTablegivenname.booleangetName()inthashCode()Generate a hash code from thisSegment.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
Creates a newTablegivenname.- Parameters:
name- must not be null or empty.- Returns:
- the new
Table.
-
create
Creates a newTablegivenname.- Parameters:
name- must not be null or empty.- Returns:
- the new
Table. - Since:
- 2.0
-
aliased
Creates a newTableusing analias.- Parameters:
name- must not be null or empty.alias- must not be null or empty.- Returns:
- the new
Tableusing thealias.
-
as
Creates a newTablealiased toalias.- Parameters:
alias- must not be null or empty.- Returns:
- the new
Tableusing thealias.
-
as
Creates a newTablealiased toalias.- Parameters:
alias- must not be null or empty.- Returns:
- the new
Tableusing thealias. - Since:
- 2.0
-
getName
-
getReferenceName
- Specified by:
getReferenceNamein interfaceTableLike- Returns:
- the table name as it is used in references. This can be the actual
nameor analias.
-
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
Description copied from interface:Visitable
-