Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.hql.internal.ast.tree
Class FromElement

    java.lang.Object
      antlr.BaseAST
          antlr.CommonAST
              org.hibernate.hql.internal.ast.tree.Node
                  org.hibernate.hql.internal.ast.tree.SqlNode
                      org.hibernate.hql.internal.ast.tree.HqlSqlWalkerNode
                          org.hibernate.hql.internal.ast.tree.FromElement

All Implemented Interfaces:
  antlr.collections.AST, Serializable, DisplayableNode, InitializeableNode, ParameterContainer

Direct Known Subclasses:
  ComponentJoin, ImpliedFromElement

    public class FromElement

extends HqlSqlWalkerNode
implements DisplayableNode, ParameterContainer

Represents a single mapped class mentioned in an HQL FROM clause. Each class reference will have the following symbols:

- A class name - This is the name of the Java class that is mapped by Hibernate.
- [optional] an HQL alias for the mapped class.
- A table name - The name of the table that is mapped to the Java class.
- A table alias - The alias for the table that will be used in the resulting SQL.

See Also:
  Serialized Form

Field Summary
`static String` | `DISCRIMINATOR_PROPERTY_NAME`

Fields inherited from class antlr.BaseAST
`down, right`

Constructor Summary
`` | `FromElement()`
`protected` | `FromElement(FromClause fromClause, FromElement origin, String alias)` Constructor form used to initialize `ComponentJoin`

Method Summary
`void` | `addEmbeddedParameter(ParameterSpecification specification)` Adds a parameter specification for a parameter encountered within this node.
`protected void` | `appendDisplayText(StringBuilder buf)`
`boolean` | `equals(Object obj)`
`String` | `getClassAlias()`
`String` | `getClassName()`
`String` | `getCollectionSuffix()`
`String` | `getCollectionTableAlias()`
`Type` | `getDataType()`
`List` | `getDestinations()`
`String` | `getDisplayText()` Returns additional display text for the AST node.
`ParameterSpecification[]` | `getEmbeddedParameters()` Retrieve all embedded parameter specifications.
`EntityPersister` | `getEntityPersister()`
`FromClause` | `getFromClause()`
`String` | `getIdentityColumn()`
`String[]` | `getIdentityColumns()`
`ParameterSpecification` | `getIndexCollectionSelectorParamSpec()`
`JoinSequence` | `getJoinSequence()`
`FromElement` | `getOrigin()`
`PropertyMapping` | `getPropertyMapping(String propertyName)`
`Type` | `getPropertyType(String propertyName, String propertyPath)`
`Queryable` | `getQueryable()`
`QueryableCollection` | `getQueryableCollection()`
`FromElement` | `getRealOrigin()`
`Type` | `getSelectType()`
`int` | `getSequence()`
`String` | `getTableAlias()`
`TypeDiscriminatorMetadata` | `getTypeDiscriminatorMetadata()`
`String` | `getWithClauseFragment()`
`String` | `getWithClauseJoinAlias()`
`void` | `handlePropertyBeingDereferenced(Type propertySource, String propertyName)`
`boolean` | `hasCacheablePersister()`
`boolean` | `hasEmbeddedParameters()` Determine whether this node contains embedded parameters.
`int` | `hashCode()`
`void` | `initializeCollection(FromClause fromClause, String classAlias, String tableAlias)`
`protected void` | `initializeComponentJoin(org.hibernate.hql.internal.ast.tree.FromElementType elementType)`
`void` | `initializeEntity(FromClause fromClause, String className, EntityPersister persister, EntityType type, String classAlias, String tableAlias)`
`boolean` | `inProjectionList()`
`boolean` | `isAllPropertyFetch()`
`boolean` | `isCollectionJoin()`
`boolean` | `isCollectionOfValuesOrComponents()`
`boolean` | `isDereferencedBySubclassProperty()`
`boolean` | `isDereferencedBySuperclassOrSubclassProperty()`
`boolean` | `isDereferencedBySuperclassProperty()`
`boolean` | `isEntity()`
`boolean` | `isFetch()`
`boolean` | `isFilter()`
`boolean` | `isFromOrJoinFragment()`
`boolean` | `isImplied()` Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in the FROM clause.
`boolean` | `isImpliedInFromClause()`
`boolean` | `isIncludeSubclasses()`
`boolean` | `isManyToMany()`
`void` | `setAllPropertyFetch(boolean fetch)`
`void` | `setCollectionJoin(boolean collectionJoin)`
`void` | `setCollectionSuffix(String suffix)`
`void` | `setCollectionTableAlias(String collectionTableAlias)`
`void` | `setColumns(String[] columns)`
`void` | `setFetch(boolean fetch)`
`void` | `setFilter(boolean b)`
`void` | `setImpliedInFromClause(boolean flag)`
`void` | `setIncludeSubclasses(boolean includeSubclasses)`
`void` | `setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)`
`void` | `setInProjectionList(boolean inProjectionList)`
`void` | `setJoinSequence(JoinSequence joinSequence)`
`void` | `setOrigin(FromElement origin, boolean manyToMany)`
`void` | `setQueryableCollection(QueryableCollection queryableCollection)`
`void` | `setRole(String role)`
`void` | `setUseFromFragment(boolean useFromFragment)`
`void` | `setUseWhereFragment(boolean b)`
`void` | `setWithClauseFragment(String withClauseJoinAlias, String withClauseFragment)`
`String[]` | `toColumns(String tableAlias, String path, boolean inSelect)`
`String[]` | `toColumns(String tableAlias, String path, boolean inSelect, boolean forceAlias)`
`boolean` | `useFromFragment()`
`boolean` | `useWhereFragment()`

Methods inherited from class org.hibernate.hql.internal.ast.tree.HqlSqlWalkerNode
`getAliasGenerator, getASTFactory, getSessionFactoryHelper, getWalker, initialize`

Methods inherited from class org.hibernate.hql.internal.ast.tree.SqlNode
`getOriginalText, setDataType, setText`

Methods inherited from class org.hibernate.hql.internal.ast.tree.Node
`getColumn, getFilename, getLine, getRenderText, getTextLength, initialize, initialize`

Methods inherited from class antlr.CommonAST
`getText, getType, initialize, setType`

Methods inherited from class antlr.BaseAST
`addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.hibernate.hql.internal.ast.tree.ParameterContainer
`setText`

Field Detail

### DISCRIMINATOR_PROPERTY_NAME

    public static final String DISCRIMINATOR_PROPERTY_NAME

See Also:
  Constant Field Values

Constructor Detail

### FromElement

    public FromElement()

### FromElement

    protected FromElement(FromClause fromClause,
                          FromElement origin,
                          String alias)

  Constructor form used to initialize `ComponentJoin`

  Parameters:
    `fromClause` - The FROM clause to which this element belongs
    `origin` - The origin (LHS) of this element
    `alias` - The alias applied to this element

Method Detail

### initializeComponentJoin

    protected void initializeComponentJoin(org.hibernate.hql.internal.ast.tree.FromElementType elementType)

### getCollectionSuffix

    public String getCollectionSuffix()

### setCollectionSuffix

    public void setCollectionSuffix(String suffix)

### initializeCollection

    public void initializeCollection(FromClause fromClause,
                                     String classAlias,
                                     String tableAlias)

### initializeEntity

    public void initializeEntity(FromClause fromClause,
                                 String className,
                                 EntityPersister persister,
                                 EntityType type,
                                 String classAlias,
                                 String tableAlias)

### getEntityPersister

    public EntityPersister getEntityPersister()

### getDataType

    public Type getDataType()

  Overrides:
    `getDataType` in class `SqlNode`

### getSelectType

    public Type getSelectType()

### getQueryable

    public Queryable getQueryable()

### getClassName

    public String getClassName()

### getClassAlias

    public String getClassAlias()

### getTableAlias

    public String getTableAlias()

### getFromClause

    public FromClause getFromClause()

### isImplied

    public boolean isImplied()

  Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in the FROM clause.

  Returns:
    true if this FromElement was implied by a path, or false if this FROM element is explicitly declared

### getDisplayText

    public String getDisplayText()

  Returns additional display text for the AST node.

  Specified by:
    `getDisplayText` in interface `DisplayableNode`
  Returns:
    String - The additional display text.

### appendDisplayText

    protected void appendDisplayText(StringBuilder buf)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### setJoinSequence

    public void setJoinSequence(JoinSequence joinSequence)

### getJoinSequence

    public JoinSequence getJoinSequence()

### setIncludeSubclasses

    public void setIncludeSubclasses(boolean includeSubclasses)

### isIncludeSubclasses

    public boolean isIncludeSubclasses()

### isDereferencedBySuperclassOrSubclassProperty

    public boolean isDereferencedBySuperclassOrSubclassProperty()

### getIdentityColumn

    public String getIdentityColumn()

### getIdentityColumns

    public String[] getIdentityColumns()

### setCollectionJoin

    public void setCollectionJoin(boolean collectionJoin)

### isCollectionJoin

    public boolean isCollectionJoin()

### setRole

    public void setRole(String role)

### setQueryableCollection

    public void setQueryableCollection(QueryableCollection queryableCollection)

### getQueryableCollection

    public QueryableCollection getQueryableCollection()

### setColumns

    public void setColumns(String[] columns)

### setOrigin

    public void setOrigin(FromElement origin,
                          boolean manyToMany)

### isManyToMany

    public boolean isManyToMany()

### getDestinations

    public List getDestinations()

### getOrigin

    public FromElement getOrigin()

### getRealOrigin

    public FromElement getRealOrigin()

### getTypeDiscriminatorMetadata

    public TypeDiscriminatorMetadata getTypeDiscriminatorMetadata()

### getPropertyType

    public Type getPropertyType(String propertyName,
                                String propertyPath)

### toColumns

    public String[] toColumns(String tableAlias,
                              String path,
                              boolean inSelect)

### toColumns

    public String[] toColumns(String tableAlias,
                              String path,
                              boolean inSelect,
                              boolean forceAlias)

### getPropertyMapping

    public PropertyMapping getPropertyMapping(String propertyName)

### setFetch

    public void setFetch(boolean fetch)

### isFetch

    public boolean isFetch()

### getSequence

    public int getSequence()

### setFilter

    public void setFilter(boolean b)

### isFilter

    public boolean isFilter()

### useFromFragment

    public boolean useFromFragment()

### setUseFromFragment

    public void setUseFromFragment(boolean useFromFragment)

### useWhereFragment

    public boolean useWhereFragment()

### setUseWhereFragment

    public void setUseWhereFragment(boolean b)

### setCollectionTableAlias

    public void setCollectionTableAlias(String collectionTableAlias)

### getCollectionTableAlias

    public String getCollectionTableAlias()

### isCollectionOfValuesOrComponents

    public boolean isCollectionOfValuesOrComponents()

### isEntity

    public boolean isEntity()

### setImpliedInFromClause

    public void setImpliedInFromClause(boolean flag)

### isImpliedInFromClause

    public boolean isImpliedInFromClause()

### setInProjectionList

    public void setInProjectionList(boolean inProjectionList)

### inProjectionList

    public boolean inProjectionList()

### isFromOrJoinFragment

    public boolean isFromOrJoinFragment()

### isAllPropertyFetch

    public boolean isAllPropertyFetch()

### setAllPropertyFetch

    public void setAllPropertyFetch(boolean fetch)

### getWithClauseFragment

    public String getWithClauseFragment()

### getWithClauseJoinAlias

    public String getWithClauseJoinAlias()

### setWithClauseFragment

    public void setWithClauseFragment(String withClauseJoinAlias,
                                      String withClauseFragment)

### hasCacheablePersister

    public boolean hasCacheablePersister()

### handlePropertyBeingDereferenced

    public void handlePropertyBeingDereferenced(Type propertySource,
                                                String propertyName)

### isDereferencedBySuperclassProperty

    public boolean isDereferencedBySuperclassProperty()

### isDereferencedBySubclassProperty

    public boolean isDereferencedBySubclassProperty()

### addEmbeddedParameter

    public void addEmbeddedParameter(ParameterSpecification specification)

  Description copied from interface: `ParameterContainer`
  Adds a parameter specification for a parameter encountered within this node. We use the term 'embedded' here because of the fact that the parameter was simply encountered as part of the node's text; it does not exist as part of a subtree as it might in a true AST.

  Specified by:
    `addEmbeddedParameter` in interface `ParameterContainer`
  Parameters:
    `specification` - The generated specification.

### hasEmbeddedParameters

    public boolean hasEmbeddedParameters()

  Description copied from interface: `ParameterContainer`
  Determine whether this node contains embedded parameters. The implication is that `ParameterContainer.getEmbeddedParameters()` is allowed to return null if this method returns false.

  Specified by:
    `hasEmbeddedParameters` in interface `ParameterContainer`
  Returns:
    True if this node contains embedded parameters; false otherwise.

### getEmbeddedParameters

    public ParameterSpecification[] getEmbeddedParameters()

  Description copied from interface: `ParameterContainer`
  Retrieve all embedded parameter specifications.

  Specified by:
    `getEmbeddedParameters` in interface `ParameterContainer`
  Returns:
    All embedded parameter specifications; may return null.
  See Also:
    `ParameterContainer.hasEmbeddedParameters()`

### getIndexCollectionSelectorParamSpec

    public ParameterSpecification getIndexCollectionSelectorParamSpec()

### setIndexCollectionSelectorParamSpec

    public void setIndexCollectionSelectorParamSpec(ParameterSpecification indexCollectionSelectorParamSpec)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.