Save This Page
Home » Hibernate-3.3.2.GA » org.hibernate » hql » classic » [javadoc | source]
org.hibernate.hql.classic
public class: QueryTranslatorImpl [javadoc | source]
java.lang.Object
   org.hibernate.loader.Loader
      org.hibernate.loader.BasicLoader
         org.hibernate.hql.classic.QueryTranslatorImpl

All Implemented Interfaces:
    FilterTranslator

An instance of QueryTranslator translates a Hibernate query string to SQL.
Fields inherited from org.hibernate.loader.BasicLoader:
NO_SUFFIX
Constructor:
 public QueryTranslatorImpl(String queryString,
    Map enabledFilters,
    SessionFactoryImplementor factory) 
    Construct a query translator; this form used internally.
    Parameters:
    queryString - The query string to process.
    enabledFilters - Any enabled filters.
    factory - The session factory.
 public QueryTranslatorImpl(String queryIdentifier,
    String queryString,
    Map enabledFilters,
    SessionFactoryImplementor factory) 
    Construct a query translator
    Parameters:
    queryIdentifier - A unique identifier for the query of which this translation is part; typically this is the original, user-supplied query string.
    queryString - The "preprocessed" query string; at the very least already processed by org.hibernate.hql.QuerySplitter .
    enabledFilters - Any enabled filters.
    factory - The session factory.
Method from org.hibernate.hql.classic.QueryTranslatorImpl Summary:
addCollection,   addEntityToFetch,   addFrom,   addFrom,   addFromClass,   addFromCollection,   addFromJoinOnly,   addJoin,   addNamedParameter,   addPathAliasAndJoin,   addQuerySpaces,   addSelectClass,   addSelectScalar,   addType,   appendGroupByToken,   appendHavingToken,   appendOrderByToken,   appendScalarSelectToken,   appendScalarSelectTokens,   appendWhereToken,   applyLocks,   collectSqlStrings,   compile,   compile,   compile,   containsCollectionFetches,   createNameFor,   createNameForCollection,   decoratePropertyMapping,   executeUpdate,   getAliasName,   getAliases,   getCollectionOwners,   getCollectionPersister,   getCollectionPersisters,   getCollectionSuffixes,   getColumnNames,   getEnabledFilters,   getEntityPersister,   getEntityPersisterUsingImports,   getEntityPersisters,   getHolderClass,   getLockModes,   getNamedParameterLocs,   getOwnerAssociationTypes,   getOwners,   getParameterTranslations,   getPathAlias,   getPathJoin,   getPropertyMapping,   getQueryIdentifier,   getQuerySpaces,   getQueryString,   getResultColumnOrRow,   getResultList,   getReturnAliases,   getReturnTypes,   getSQLString,   getSuffixes,   isCompiled,   isManipulationStatement,   isName,   isShallowQuery,   isSubquery,   isSubselectLoadingEnabled,   iterate,   list,   scroll,   setAliasName,   setCollectionToFetch,   setDistinct,   setHolderClass,   toString,   unalias,   upgradeLocks,   validateScrollability
Methods from org.hibernate.loader.BasicLoader:
generateSuffixes,   generateSuffixes,   getCollectionAliases,   getCollectionSuffixes,   getEntityAliases,   getSuffixes,   postInstantiate
Methods from org.hibernate.loader.Loader:
applyLocks,   autoDiscoverTypes,   bindNamedParameters,   bindParameterValues,   bindPositionalParameters,   checkScrollability,   doList,   getAliases,   getCollectionAliases,   getCollectionOwners,   getCollectionPersisters,   getEntityAliases,   getEntityEagerPropertyFetches,   getEntityPersisters,   getFactory,   getLockModes,   getNamedParameterLocs,   getOwnerAssociationTypes,   getOwners,   getQueryIdentifier,   getResultColumnOrRow,   getResultList,   getResultSet,   getSQLString,   hasSubselectLoadableCollections,   isSingleRowLoader,   isSubselectLoadingEnabled,   list,   loadCollection,   loadCollectionBatch,   loadCollectionSubselect,   loadEntity,   loadEntity,   loadEntityBatch,   loadSequentialRowsForward,   loadSequentialRowsReverse,   loadSingleRow,   needsFetchingScroll,   postInstantiate,   prepareQueryStatement,   preprocessSQL,   scroll,   toString,   upgradeLocks
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.hql.classic.QueryTranslatorImpl Detail:
  void addCollection(String name,
    String role) 
  void addEntityToFetch(String name,
    String oneToOneOwnerName,
    AssociationType ownerAssociationType) 
  void addFrom(String name,
    JoinSequence joinSequence) throws QueryException 
  void addFrom(String name,
    String type,
    JoinSequence joinSequence) throws QueryException 
  void addFromClass(String name,
    Queryable classPersister) throws QueryException 
  void addFromCollection(String name,
    String collectionRole,
    JoinSequence joinSequence) throws QueryException 
  void addFromJoinOnly(String name,
    JoinSequence joinSequence) throws QueryException 
  void addJoin(String name,
    JoinSequence joinSequence) throws QueryException 
  void addNamedParameter(String name) 
  void addPathAliasAndJoin(String path,
    String alias,
    JoinSequence joinSequence) 
  void addQuerySpaces(Serializable[] spaces) 
  void addSelectClass(String name) 
  void addSelectScalar(Type type) 
  void addType(String name,
    String type) 
  void appendGroupByToken(String token) 
  void appendHavingToken(String token) 
  void appendOrderByToken(String token) 
  void appendScalarSelectToken(String token) 
  void appendScalarSelectTokens(String[] tokens) 
  void appendWhereToken(String token) 
 protected String applyLocks(String sql,
    Map lockModes,
    Dialect dialect) throws QueryException 
 public List collectSqlStrings() 
  void compile(QueryTranslatorImpl superquery) throws QueryException, MappingException 
    Compile a subquery.
 public synchronized  void compile(Map replacements,
    boolean scalar) throws QueryException, MappingException 
    Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops.
 public synchronized  void compile(String collectionRole,
    Map replacements,
    boolean scalar) throws QueryException, MappingException 
    Compile a filter. This method may be called multiple times. Subsequent invocations are no-ops.
 public boolean containsCollectionFetches() 
 String createNameFor(String type) 
 String createNameForCollection(String role) 
  void decoratePropertyMapping(String name,
    PropertyMapping mapping) 
 public int executeUpdate(QueryParameters queryParameters,
    SessionImplementor session) throws HibernateException 
 public String getAliasName(String alias) 
 protected String[] getAliases() 
 protected int[] getCollectionOwners() 
 QueryableCollection getCollectionPersister(String role) throws QueryException 
 public CollectionPersister[] getCollectionPersisters() 
    Overrides method from Loader
 protected String[] getCollectionSuffixes() 
 public String[][] getColumnNames() 
 public Map getEnabledFilters() 
 Queryable getEntityPersister(String entityName) throws QueryException 
 Queryable getEntityPersisterUsingImports(String className) 
 protected Loadable[] getEntityPersisters() 
    Persisters for the return values of a find() style query.
 public Class getHolderClass() 
 protected LockMode[] getLockModes(Map lockModes) 
 public int[] getNamedParameterLocs(String name) throws QueryException 
 protected EntityType[] getOwnerAssociationTypes() 
 protected int[] getOwners() 
 public ParameterTranslations getParameterTranslations() 
 String getPathAlias(String path) 
 JoinSequence getPathJoin(String path) 
 PropertyMapping getPropertyMapping(String name) throws QueryException 
 public String getQueryIdentifier() 
 public final Set getQuerySpaces() 
 public String getQueryString() 
 protected Object getResultColumnOrRow(Object[] row,
    ResultTransformer transformer,
    ResultSet rs,
    SessionImplementor session) throws SQLException, HibernateException 
 protected List getResultList(List results,
    ResultTransformer resultTransformer) throws QueryException 
 public String[] getReturnAliases() 
 public Type[] getReturnTypes() 
    Types of the return values of an iterate() style query.
 public String getSQLString() 
 protected String[] getSuffixes() 
 protected boolean isCompiled() 
 public boolean isManipulationStatement() 
 boolean isName(String name) 
 boolean isShallowQuery() 
    Is this query called by scroll() or iterate()?
 boolean isSubquery() 
 protected boolean isSubselectLoadingEnabled() 
 public Iterator iterate(QueryParameters queryParameters,
    EventSource session) throws HibernateException 
    Return the query results as an iterator
 public List list(SessionImplementor session,
    QueryParameters queryParameters) throws HibernateException 
 public ScrollableResults scroll(QueryParameters queryParameters,
    SessionImplementor session) throws HibernateException 
  void setAliasName(String alias,
    String name) 
  void setCollectionToFetch(String role,
    String name,
    String ownerName,
    String entityName) throws QueryException 
  void setDistinct(boolean distinct) 
  void setHolderClass(Class clazz) 
 public String toString() 
 String unalias(String path) 
 protected boolean upgradeLocks() 
 public  void validateScrollability() throws HibernateException