public abstract class

AbstractRestrictableStatement

extends AbstractStatement
implements RestrictableStatement
java.lang.Object
   ↳ antlr.CommonAST
     ↳ org.hibernate.hql.ast.tree.Node
       ↳ org.hibernate.hql.ast.tree.SqlNode
         ↳ org.hibernate.hql.ast.tree.HqlSqlWalkerNode
           ↳ org.hibernate.hql.ast.tree.AbstractStatement
             ↳ org.hibernate.hql.ast.tree.AbstractRestrictableStatement
Known Direct Subclasses

Class Overview

Convenience implementation of RestrictableStatement to centralize common functionality.

Summary

Public Constructors
AbstractRestrictableStatement()
Public Methods
final FromClause getFromClause()
Retreives the from-clause in effect for this statement.
final AST getWhereClause()
Retreives the where-clause defining the restriction(s) in effect for this statement.
final boolean hasWhereClause()
Does this statement tree currently contain a where clause?
Protected Methods
abstract Logger getLog()
abstract int getWhereClauseParentTokenType()
AST locateWhereClause()
[Expand]
Inherited Methods
From class org.hibernate.hql.ast.tree.AbstractStatement
From class org.hibernate.hql.ast.tree.HqlSqlWalkerNode
From class org.hibernate.hql.ast.tree.SqlNode
From class org.hibernate.hql.ast.tree.Node
From class java.lang.Object
From interface org.hibernate.hql.ast.tree.DisplayableNode
From interface org.hibernate.hql.ast.tree.InitializeableNode
From interface org.hibernate.hql.ast.tree.RestrictableStatement
From interface org.hibernate.hql.ast.tree.Statement

Public Constructors

public AbstractRestrictableStatement ()

Public Methods

public final FromClause getFromClause ()

Retreives the from-clause in effect for this statement.

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

public final AST getWhereClause ()

Retreives 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
  • The where clause.
See Also

public final boolean hasWhereClause ()

Does this statement tree currently contain a where clause?

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

Protected Methods

protected abstract Logger getLog ()

protected abstract int getWhereClauseParentTokenType ()

protected AST locateWhereClause ()