Top Description Fields Constructors Methods
org.hibernate.sql.ast.tree.from

public Class NamedTableReference

extends AbstractTableReference
Class Inheritance
Known Direct Subclasses
org.hibernate.sql.ast.tree.from.UnionTableReference
Imports
java.util.Collections, .List, .Locale, java.util.function.Consumer, .Function, org.hibernate.Internal, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.SqlAstWalker

Represents a reference to a "named" table in a query's from clause.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private String
private final String
Inherited from org.hibernate.sql.ast.tree.from.AbstractTableReference:
identificationVariableisOptional

Constructor Summary

AccessConstructor and Description
public
NamedTableReference(String tableExpression, String identificationVariable)

public
NamedTableReference(String tableExpression, String identificationVariable, boolean isOptional)

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
public List<String>
public String
public String
getTableId()

Implements org.hibernate.sql.ast.tree.from.TableReference.getTableId.

An identifier for the table reference.
public TableReference
getTableReference(NavigablePath
The path for which to look up the table reference, may be null
navigablePath
,
String
The table expression for which to look up the table reference
tableExpression
,
boolean
Whether to potentially create table reference joins for this table group
resolve
)

Implements org.hibernate.sql.ast.tree.from.TableReference.getTableReference.

Returns the table reference for the table expression, or null if not found.
public TableReference
resolveTableReference(NavigablePath
The path for which to look up the table reference, may be null
navigablePath
,
String
The table expression for which to look up the table reference
tableExpression
)

Implements org.hibernate.sql.ast.tree.from.TableReference.resolveTableReference.

Like getTableReference(NavigablePath, String, boolean), but will throw an exception if no table reference can be found, even after resolving possible table reference joins.
public void
setPrunedTableExpression(String prunedTableExpression)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public Boolean
Inherited from org.hibernate.sql.ast.tree.from.AbstractTableReference:
equalsgetIdentificationVariablehashCodeisOptional

Field Detail

prunedTableExpressionback to summary
private String prunedTableExpression
tableExpressionback to summary
private final String tableExpression

Constructor Detail

NamedTableReferenceback to summary
public NamedTableReference(String tableExpression, String identificationVariable)
NamedTableReferenceback to summary
public NamedTableReference(String tableExpression, String identificationVariable, boolean isOptional)

Method Detail

acceptback to summary
public void accept(SqlAstWalker sqlTreeWalker)

Implements org.hibernate.sql.ast.tree.from.TableReference.accept.

Annotations
@Override
containsAffectedTableNameback to summary
public boolean containsAffectedTableName(String requestedName)

Overrides default org.hibernate.sql.ast.tree.from.TableReference.containsAffectedTableName.

Annotations
@Override
getAffectedTableNamesback to summary
public List<String> getAffectedTableNames()

Overrides default org.hibernate.sql.ast.tree.from.TableReference.getAffectedTableNames.

Annotations
@Override
getTableExpressionback to summary
public String getTableExpression()
getTableIdback to summary
public String getTableId()

Implements org.hibernate.sql.ast.tree.from.TableReference.getTableId.

Doc from org.hibernate.sql.ast.tree.from.TableReference.getTableId.

An identifier for the table reference. May be null if this is not a named table reference.

Annotations
@Override
getTableReferenceback to summary
public TableReference getTableReference(NavigablePath navigablePath, String tableExpression, boolean resolve)

Implements org.hibernate.sql.ast.tree.from.TableReference.getTableReference.

Doc from org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.getTableReference.

Returns the table reference for the table expression, or null if not found.

Parameters
navigablePath:NavigablePath

The path for which to look up the table reference, may be null

tableExpression:String

The table expression for which to look up the table reference

resolve:boolean

Whether to potentially create table reference joins for this table group

Annotations
@Override
resolveTableReferenceback to summary
public TableReference resolveTableReference(NavigablePath navigablePath, String tableExpression)

Implements org.hibernate.sql.ast.tree.from.TableReference.resolveTableReference.

Doc from org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.resolveTableReference.

Like getTableReference(NavigablePath, String, boolean), but will throw an exception if no table reference can be found, even after resolving possible table reference joins.

Parameters
navigablePath:NavigablePath

The path for which to look up the table reference, may be null

tableExpression:String

The table expression for which to look up the table reference

Annotations
@Override
setPrunedTableExpressionback to summary
public void setPrunedTableExpression(String prunedTableExpression)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
visitAffectedTableNamesback to summary
public Boolean visitAffectedTableNames(Function<String, Boolean> nameCollector)

Implements org.hibernate.sql.ast.tree.from.TableReference.visitAffectedTableNames.

Annotations
@Override