public interface SQLQuery extends Query, SynchronizeableQuery
addSynchronizedQuerySpace(java.lang.String), addSynchronizedEntityName(java.lang.String) and
         addSynchronizedEntityClass(java.lang.Class).  This allows Hibernate to know how to properly deal with
         auto-flush checking as well as cached query results if the results of the query are being
         cached.
     setResultSetMapping(java.lang.String)
     addEntity(java.lang.String), addRoot(java.lang.String, java.lang.String), addJoin(java.lang.String, java.lang.String),
         addFetch(java.lang.String, java.lang.String, java.lang.String) and addScalar(java.lang.String) methods
     | Modifier and Type | Interface and Description | 
|---|---|
static interface  | 
SQLQuery.FetchReturn
Allows access to further control how join fetch returns are mapped back from result sets. 
 | 
static interface  | 
SQLQuery.ReturnProperty
Allows access to further control how properties within a root or join fetch are mapped back from the result set. 
 | 
static interface  | 
SQLQuery.RootReturn
Allows access to further control how root returns are mapped back from result sets. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
SQLQuery | 
addEntity(Class entityType)
Declare a "root" entity, without specifying an alias. 
 | 
SQLQuery | 
addEntity(String entityName)
Declare a "root" entity, without specifying an alias. 
 | 
SQLQuery | 
addEntity(String tableAlias,
         Class entityType)
Declare a "root" entity. 
 | 
SQLQuery | 
addEntity(String tableAlias,
         Class entityName,
         LockMode lockMode)
Declare a "root" entity, specifying a lock mode. 
 | 
SQLQuery | 
addEntity(String tableAlias,
         String entityName)
Declare a "root" entity. 
 | 
SQLQuery | 
addEntity(String tableAlias,
         String entityName,
         LockMode lockMode)
Declare a "root" entity, specifying a lock mode. 
 | 
SQLQuery.FetchReturn | 
addFetch(String tableAlias,
        String ownerTableAlias,
        String joinPropertyName)
Declare a join fetch result. 
 | 
SQLQuery | 
addJoin(String tableAlias,
       String path)
Declare a join fetch result. 
 | 
SQLQuery | 
addJoin(String tableAlias,
       String path,
       LockMode lockMode)
Declare a join fetch result, specifying a lock mode. 
 | 
SQLQuery | 
addJoin(String tableAlias,
       String ownerTableAlias,
       String joinPropertyName)
Declare a join fetch result. 
 | 
SQLQuery.RootReturn | 
addRoot(String tableAlias,
       Class entityType)
Add a new root return mapping, returning a  
SQLQuery.RootReturn to allow further definition. | 
SQLQuery.RootReturn | 
addRoot(String tableAlias,
       String entityName)
Add a new root return mapping, returning a  
SQLQuery.RootReturn to allow further definition. | 
SQLQuery | 
addScalar(String columnAlias)
Declare a scalar query result. 
 | 
SQLQuery | 
addScalar(String columnAlias,
         Type type)
Declare a scalar query result. 
 | 
SQLQuery | 
addSynchronizedEntityClass(Class entityClass)
Adds an entity for (a) auto-flush checking and (b) query result cache invalidation checking. 
 | 
SQLQuery | 
addSynchronizedEntityName(String entityName)
Adds an entity name for (a) auto-flush checking and (b) query result cache invalidation checking. 
 | 
SQLQuery | 
addSynchronizedQuerySpace(String querySpace)
Adds a query space. 
 | 
List<NativeSQLQueryReturn> | 
getQueryReturns()
Retrieve the returns associated with this query. 
 | 
boolean | 
isCallable()
Is this native-SQL query known to be callable? 
 | 
SQLQuery | 
setResultSetMapping(String name)
Use a predefined named result-set mapping. 
 | 
addQueryHint, executeUpdate, getComment, getFirstResult, getLockOptions, getMaxResults, getNamedParameters, getQueryString, getReturnAliases, iterate, list, scroll, scroll, setBigDecimal, setBigDecimal, setBigInteger, setBigInteger, setBinary, setBinary, setBoolean, setBoolean, setByte, setByte, setCacheable, setCacheMode, setCacheRegion, setCalendar, setCalendar, setCalendarDate, setCalendarDate, setCharacter, setCharacter, setComment, setDate, setDate, setDouble, setDouble, setEntity, setEntity, setFetchSize, setFirstResult, setFloat, setFloat, setFlushMode, setInteger, setInteger, setLocale, setLocale, setLockMode, setLockOptions, setLong, setLong, setMaxResults, setParameter, setParameter, setParameter, setParameter, setParameterList, setParameterList, setParameterList, setParameterList, setParameters, setProperties, setProperties, setReadOnly, setResultTransformer, setSerializable, setSerializable, setShort, setShort, setString, setString, setText, setText, setTime, setTime, setTimeout, setTimestamp, setTimestamp, uniqueResultgetCacheMode, getCacheRegion, getFetchSize, getFlushMode, getReturnTypes, getTimeout, isCacheable, isReadOnlygetSynchronizedQuerySpacesSQLQuery addSynchronizedQuerySpace(String querySpace)
SynchronizeableQueryaddSynchronizedQuerySpace in interface SynchronizeableQueryquerySpace - The query space to be auto-flushed for this query.this, for method chainingSQLQuery addSynchronizedEntityName(String entityName) throws MappingException
SynchronizeableQuerySynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String) for all tables associated with the given entity.addSynchronizedEntityName in interface SynchronizeableQueryentityName - The name of the entity upon whose defined query spaces we should additionally synchronize.this, for method chainingMappingException - Indicates the given name could not be resolved as an entitySQLQuery addSynchronizedEntityClass(Class entityClass) throws MappingException
SynchronizeableQuerySynchronizeableQuery.addSynchronizedQuerySpace(java.lang.String) for all tables associated with the given entity.addSynchronizedEntityClass in interface SynchronizeableQueryentityClass - The class of the entity upon whose defined query spaces we should additionally synchronize.this, for method chainingMappingException - Indicates the given class could not be resolved as an entitySQLQuery setResultSetMapping(String name)
<result-set/> element in a
 Hibernate hbm.xml file or through a SqlResultSetMapping annotation.name - The name of the mapping to use.boolean isCallable()
true if the query is known to be callable; false otherwise.List<NativeSQLQueryReturn> getQueryReturns()
SQLQuery addScalar(String columnAlias)
<return-scalar/> in hbm.xml or ColumnResultcolumnAlias - The column alias in the result-set to be processed as a scalar resultthis, for method chainingSQLQuery addScalar(String columnAlias, Type type)
columnAlias - The column alias in the result-set to be processed as a scalar resulttype - The Hibernate type as which to treat the value.this, for method chainingSQLQuery.RootReturn addRoot(String tableAlias, String entityName)
SQLQuery.RootReturn to allow further definition.tableAlias - The SQL table alias to map to this entityentityName - The name of the entity.SQLQuery.RootReturn addRoot(String tableAlias, Class entityType)
SQLQuery.RootReturn to allow further definition.tableAlias - The SQL table alias to map to this entityentityType - The java type of the entity.SQLQuery addEntity(String entityName)
addRoot(java.lang.String, java.lang.String) if you need further control of the mappingentityName - The entity name that is the root return of the query.this, for method chainingSQLQuery addEntity(String tableAlias, String entityName)
tableAlias - The SQL table aliasentityName - The entity namethis, for method chainingSQLQuery addEntity(String tableAlias, String entityName, LockMode lockMode)
tableAlias - The SQL table aliasentityName - The entity namelockMode - The lock mode for this return.this, for method chainingSQLQuery addEntity(Class entityType)
entityType - The java type of the entity to add as a rootthis, for method chainingSQLQuery addEntity(String tableAlias, Class entityType)
tableAlias - The SQL table aliasentityType - The java type of the entity to add as a rootthis, for method chainingSQLQuery addEntity(String tableAlias, Class entityName, LockMode lockMode)
tableAlias - The SQL table aliasentityName - The entity namelockMode - The lock mode for this return.this, for method chainingSQLQuery.FetchReturn addFetch(String tableAlias, String ownerTableAlias, String joinPropertyName)
tableAlias - The SQL table alias for the data to be mapped to this fetchownerTableAlias - Identify the table alias of the owner of this association.  Should match the alias of a
 previously added root or fetchjoinPropertyName - The name of the property being join fetched.SQLQuery addJoin(String tableAlias, String path)
tableAlias - The SQL table alias for the data to be mapped to this fetchpath - The association path ([owner-alias].[property-name]).this, for method chainingSQLQuery addJoin(String tableAlias, String ownerTableAlias, String joinPropertyName)
tableAlias - The SQL table alias for the data to be mapped to this fetchownerTableAlias - Identify the table alias of the owner of this association.  Should match the alias of a
 previously added root or fetchjoinPropertyName - The name of the property being join fetched.this, for method chainingSQLQuery addJoin(String tableAlias, String path, LockMode lockMode)
tableAlias - The SQL table alias for the data to be mapped to this fetchpath - The association path ([owner-alias].[property-name]).lockMode - The lock mode for this return.this, for method chainingCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.