Top Description Fields Constructors Methods
org.hibernate.hql.internal.ast.tree

public abstract Class AbstractRestrictableStatement

extends AbstractStatement
implements RestrictableStatement
Class Inheritance
All Implemented Interfaces
org.hibernate.hql.internal.ast.tree.RestrictableStatement, org.hibernate.hql.internal.ast.tree.Statement
Known Direct Subclasses
org.hibernate.hql.internal.ast.tree.DeleteStatement, org.hibernate.hql.internal.ast.tree.QueryNode, org.hibernate.hql.internal.ast.tree.UpdateStatement
Imports
org.hibernate.hql.internal.antlr.HqlSqlTokenTypes, org.hibernate.hql.internal.ast.util.ASTUtil, org.hibernate.internal.CoreMessageLogger, antlr.collections.AST

Convenience implementation of RestrictableStatement to centralize common functionality.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private FromClause
private AST

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final FromClause
getFromClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.getFromClause.

Retrieve the from-clause in effect for this statement.
protected abstract CoreMessageLogger
public final AST
getWhereClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.getWhereClause.

Retrieve the where-clause defining the restriction(s) in effect for this statement.
protected abstract int
public final boolean
hasWhereClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.hasWhereClause.

Does this statement tree currently contain a where clause?
protected AST
Inherited from org.hibernate.hql.internal.ast.tree.AbstractStatement:
getDisplayText

Field Detail

fromClauseback to summary
private FromClause fromClause
whereClauseback to summary
private AST whereClause

Constructor Detail

AbstractRestrictableStatementback to summary
public AbstractRestrictableStatement()

Method Detail

getFromClauseback to summary
public final FromClause getFromClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.getFromClause.

Doc from org.hibernate.hql.internal.ast.tree.RestrictableStatement.getFromClause.

Retrieve the from-clause in effect for this statement.

Returns:FromClause

The from-clause for this statement; could be null if the from-clause has not yet been parsed/generated.

Annotations
@Override
getLogback to summary
protected abstract CoreMessageLogger getLog()
getWhereClauseback to summary
public final AST getWhereClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.getWhereClause.

Doc from org.hibernate.hql.internal.ast.tree.RestrictableStatement.getWhereClause.

Retrieve the where-clause defining the restriction(s) in effect for this statement.

Note that this will generate a where-clause if one was not found, so caution needs to taken prior to calling this that restrictions will actually exist in the resulting statement tree (otherwise "unexpected end of subtree" errors might occur during rendering).

Returns:AST

The where clause.

Annotations
@Override
getWhereClauseParentTokenTypeback to summary
protected abstract int getWhereClauseParentTokenType()
hasWhereClauseback to summary
public final boolean hasWhereClause()

Implements org.hibernate.hql.internal.ast.tree.RestrictableStatement.hasWhereClause.

Doc from org.hibernate.hql.internal.ast.tree.RestrictableStatement.hasWhereClause.

Does this statement tree currently contain a where clause?

Returns:boolean

True if a where-clause is found in the statement tree and that where clause actually defines restrictions; false otherwise.

Annotations
@Override
locateWhereClauseback to summary
protected AST locateWhereClause()