CriteriaLoader (Hibernate JavaDocs)
Date: 2012-04-05

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.loader.criteria
Class CriteriaLoader

    java.lang.Object
      org.hibernate.loader.Loader
          org.hibernate.loader.BasicLoader
              org.hibernate.loader.OuterJoinLoader
                  org.hibernate.loader.criteria.CriteriaLoader

    public class CriteriaLoader

extends OuterJoinLoader

A `Loader` for `Criteria` queries. Note that criteria queries are more like multi-object `load()`s than like HQL queries.

Field Summary

Fields inherited from class org.hibernate.loader.OuterJoinLoader
`aliases, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, ownerAssociationTypes, owners, persisters, sql, suffixes`

Fields inherited from class org.hibernate.loader.BasicLoader
`NO_SUFFIX`

Fields inherited from class org.hibernate.loader.Loader
`LOG`

Constructor Summary
`CriteriaLoader(OuterJoinLoadable persister, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers)`

Method Summary
`protected String` | `applyLocks(String sqlSelectString, LockOptions lockOptions, Dialect dialect)` Append `FOR UPDATE OF` clause, if necessary.
`protected boolean` | `areResultSetRowsTransformedImmediately()` Are rows transformed immediately after being read from the ResultSet?
`protected LockMode[]` | `getLockModes(LockOptions lockOptions)` What lock options does this load entities with?
`Set` | `getQuerySpaces()`
`protected Object` | `getResultColumnOrRow(Object[] row, ResultTransformer transformer, ResultSet rs, SessionImplementor session)` Get the actual object that is returned in the user-visible result list.
`protected List` | `getResultList(List results, ResultTransformer resultTransformer)`
`protected Object[]` | `getResultRow(Object[] row, ResultSet rs, SessionImplementor session)`
`protected String[]` | `getResultRowAliases()` Returns the aliases that corresponding to a result row.
`protected boolean[]` | `includeInResultRow()`
`protected boolean` | `isSubselectLoadingEnabled()`
`List` | `list(SessionImplementor session)`
`protected ResultTransformer` | `resolveResultTransformer(ResultTransformer resultTransformer)` Determine the actual ResultTransformer that will be used to transform query results.
`ScrollableResults` | `scroll(SessionImplementor session, ScrollMode scrollMode)`

Methods inherited from class org.hibernate.loader.OuterJoinLoader
`getAliases, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getEntityPersisters, getLoadQueryInfluencers, getLockOptions, getOwnerAssociationTypes, getOwners, getSQLString, getSuffixes, initFromWalker`

Methods inherited from class org.hibernate.loader.BasicLoader
`generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiate`

Methods inherited from class org.hibernate.loader.Loader
`applyPostLoadLocks, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getNamedParameterLocs, getQueryIdentifier, getResultSet, hasSubselectLoadableCollections, isSingleRowLoader, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, scroll, toString, upgradeLocks`

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

Constructor Detail

### CriteriaLoader

    public CriteriaLoader(OuterJoinLoadable persister,
                          SessionFactoryImplementor factory,
                          CriteriaImpl criteria,
                          String rootEntityName,
                          LoadQueryInfluencers loadQueryInfluencers)
                   throws HibernateException

Throws:
  `HibernateException`

Method Detail

### scroll

    public ScrollableResults scroll(SessionImplementor session,
                                    ScrollMode scrollMode)
                             throws HibernateException

  Throws:
    `HibernateException`

### list

    public List list(SessionImplementor session)
              throws HibernateException

  Throws:
    `HibernateException`

### getResultRowAliases

    protected String[] getResultRowAliases()

  Description copied from class: `Loader`
  Returns the aliases that corresponding to a result row.

  Overrides:
    `getResultRowAliases` in class `Loader`
  Returns:
    Returns the aliases that corresponding to a result row.

### resolveResultTransformer

    protected ResultTransformer resolveResultTransformer(ResultTransformer resultTransformer)

  Description copied from class: `Loader`
  Determine the actual ResultTransformer that will be used to transform query results.

  Overrides:
    `resolveResultTransformer` in class `Loader`
  Parameters:
    `resultTransformer` - the specified result transformer
  Returns:
    the actual result transformer

### areResultSetRowsTransformedImmediately

    protected boolean areResultSetRowsTransformedImmediately()

  Description copied from class: `Loader`
  Are rows transformed immediately after being read from the ResultSet?

  Overrides:
    `areResultSetRowsTransformedImmediately` in class `Loader`
  Returns:
    true, if getResultColumnOrRow() transforms the results; false, otherwise

### includeInResultRow

    protected boolean[] includeInResultRow()

  Overrides:
    `includeInResultRow` in class `Loader`

### getResultColumnOrRow

    protected Object getResultColumnOrRow(Object[] row,
                                          ResultTransformer transformer,
                                          ResultSet rs,
                                          SessionImplementor session)
                                   throws SQLException,
                                          HibernateException

  Description copied from class: `Loader`
  Get the actual object that is returned in the user-visible result list. This empty implementation merely returns its first argument. This is overridden by some subclasses.

  Overrides:
    `getResultColumnOrRow` in class `Loader`
  Throws:
    `SQLException`
    `HibernateException`

### getResultRow

    protected Object[] getResultRow(Object[] row,
                                    ResultSet rs,
                                    SessionImplementor session)
                             throws SQLException,
                                    HibernateException

  Overrides:
    `getResultRow` in class `Loader`
  Throws:
    `SQLException`
    `HibernateException`

### getQuerySpaces

    public Set getQuerySpaces()

### applyLocks

    protected String applyLocks(String sqlSelectString,
                                LockOptions lockOptions,
                                Dialect dialect)
                         throws QueryException

  Description copied from class: `Loader`
  Append `FOR UPDATE OF` clause, if necessary. This empty superclass implementation merely returns its first argument.

  Overrides:
    `applyLocks` in class `Loader`
  Throws:
    `QueryException`

### getLockModes

    protected LockMode[] getLockModes(LockOptions lockOptions)

  Description copied from class: `Loader`
  What lock options does this load entities with?

  Overrides:
    `getLockModes` in class `OuterJoinLoader`
  Parameters:
    `lockOptions` - a collection of lock options specified dynamically via the Query interface

### isSubselectLoadingEnabled

    protected boolean isSubselectLoadingEnabled()

  Overrides:
    `isSubselectLoadingEnabled` in class `Loader`

### getResultList

    protected List getResultList(List results,
                                 ResultTransformer resultTransformer)

  Overrides:
    `getResultList` in class `Loader`

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.