public class FromItem extends BaseObject implements QueryItem, Cloneable
FromClause
,
Serialized FormConstructor and Description |
---|
FromItem(JoinType join,
FromItem leftSide,
FromItem rightSide,
SelectItem[] leftOn,
SelectItem[] rightOn)
Constructor for advanced join types with custom relationships
|
FromItem(JoinType join,
Relationship relationship)
Constructor for join FROM clauses that join two tables using their
relationship.
|
FromItem(Query subQuery)
Constructor for sub-query FROM clauses
|
FromItem(String expression)
Creates a single unvalidated from item based on a expression.
|
FromItem(Table table)
Constructor for table FROM clauses
|
Modifier and Type | Method and Description |
---|---|
protected FromItem |
clone() |
protected void |
decorateIdentity(List<Object> identifiers)
Subclasses should implement this method and add all fields to the list
that are to be included in equals(...) and hashCode() evaluation
|
String |
getAlias() |
String |
getAlias(Table table)
Gets the alias of a table, if it is registered (and visible, ie.
|
String |
getExpression() |
JoinType |
getJoin() |
SelectItem[] |
getLeftOn() |
FromItem |
getLeftSide() |
Query |
getQuery() |
SelectItem[] |
getRightOn() |
FromItem |
getRightSide() |
String |
getSameQueryAlias() |
Query |
getSubQuery() |
Table |
getTable() |
FromItem |
setAlias(String alias) |
QueryItem |
setQuery(Query query) |
String |
toSql() |
String |
toSql(boolean includeSchemaInColumnPaths) |
String |
toString() |
String |
toStringNoAlias() |
String |
toStringNoAlias(boolean includeSchemaInColumnPaths) |
classEquals, equals, hashCode
public FromItem(Table table)
public FromItem(Query subQuery)
subQuery
- the subquery to usepublic FromItem(JoinType join, Relationship relationship)
join
- the join type to userelationship
- the relationship to use for joining the tablespublic FromItem(JoinType join, FromItem leftSide, FromItem rightSide, SelectItem[] leftOn, SelectItem[] rightOn)
join
- the join type to useleftSide
- the left side of the joinrightSide
- the right side of the joinleftOn
- what left-side select items to use for the ON clauserightOn
- what right-side select items to use for the ON clausepublic FromItem(String expression)
expression
- An expression to use for the from item, for example "MYTABLE".public String getAlias()
public String getSameQueryAlias()
public Table getTable()
public Query getSubQuery()
public JoinType getJoin()
public FromItem getLeftSide()
public FromItem getRightSide()
public SelectItem[] getLeftOn()
public SelectItem[] getRightOn()
public String getExpression()
public String toSql(boolean includeSchemaInColumnPaths)
public String toStringNoAlias()
public String toStringNoAlias(boolean includeSchemaInColumnPaths)
public String getAlias(Table table)
table
- the table to get the alias forprotected void decorateIdentity(List<Object> identifiers)
BaseObject
decorateIdentity
in class BaseObject
public String toString()
toString
in interface QueryItem
toString
in class BaseObject
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.