|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.internal.AbstractQueryImpl
org.hibernate.internal.SQLQueryImpl
public class SQLQueryImpl
Implementation of the SQLQuery contract.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.hibernate.SQLQuery |
|---|
SQLQuery.FetchReturn, SQLQuery.ReturnProperty, SQLQuery.RootReturn |
| Field Summary |
|---|
| Fields inherited from class org.hibernate.internal.AbstractQueryImpl |
|---|
parameterMetadata, session |
| Method Summary | |
|---|---|
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 alias,
Class entityClass)
Declare a "root" entity |
SQLQuery |
addEntity(String alias,
Class entityClass,
LockMode lockMode)
Declare a "root" entity, specifying a lock mode |
SQLQuery |
addEntity(String alias,
String entityName)
Declare a "root" entity |
SQLQuery |
addEntity(String alias,
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 alias,
String path)
Declare a join fetch result. |
SQLQuery |
addJoin(String alias,
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 (table name) for (a) auto-flush checking and (b) query result cache invalidation checking |
int |
executeUpdate()
Execute the update or delete statement. |
LockOptions |
getLockOptions()
|
QueryParameters |
getQueryParameters(Map namedParams)
|
String[] |
getReturnAliases()
Return the HQL select clause aliases (if any) |
Type[] |
getReturnTypes()
Return the Hibernate types of the query result set. |
Iterator |
iterate()
Return the query results as an Iterator. |
List |
list()
Return the query results as a List. |
ScrollableResults |
scroll()
Return the query results as ScrollableResults. |
ScrollableResults |
scroll(ScrollMode scrollMode)
Return the query results as ScrollableResults. |
Query |
setLockMode(String alias,
LockMode lockMode)
Set the lockmode for the objects idententified by the given alias that appears in the FROM clause. |
Query |
setLockOptions(LockOptions lockOptions)
Set the lock options for the objects idententified by the given alias that appears in the FROM clause. |
SQLQuery |
setResultSetMapping(String name)
Use a predefined named result-set mapping. |
protected void |
verifyParameters()
Perform parameter validation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public List list()
throws HibernateException
Query
list in interface QueryHibernateException
public ScrollableResults scroll(ScrollMode scrollMode)
throws HibernateException
Query
scroll in interface QueryHibernateExceptionScrollableResults,
ScrollMode
public ScrollableResults scroll()
throws HibernateException
Query
scroll in interface QueryHibernateExceptionScrollableResults
public Iterator iterate()
throws HibernateException
Query
iterate in interface QueryHibernateExceptionpublic QueryParameters getQueryParameters(Map namedParams)
getQueryParameters in class AbstractQueryImplprotected void verifyParameters()
AbstractQueryImpl
verifyParameters in class AbstractQueryImpl
public String[] getReturnAliases()
throws HibernateException
Query
getReturnAliases in interface QuerygetReturnAliases in class AbstractQueryImplHibernateException
public Type[] getReturnTypes()
throws HibernateException
Query
getReturnTypes in interface QuerygetReturnTypes in class AbstractQueryImplHibernateException
public Query setLockMode(String alias,
LockMode lockMode)
Query
setLockMode in interface Queryalias - a query alias, or this for a collection filterpublic Query setLockOptions(LockOptions lockOptions)
Query
setLockOptions in interface Querypublic LockOptions getLockOptions()
getLockOptions in interface QuerygetLockOptions in class AbstractQueryImpl
public SQLQuery addScalar(String columnAlias,
Type type)
SQLQuery<return-scalar/> in hbm.xml or ColumnResult
addScalar in interface SQLQuerycolumnAlias - 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 chainingpublic SQLQuery addScalar(String columnAlias)
SQLQuery<return-scalar/> in hbm.xml or ColumnResult
addScalar in interface SQLQuerycolumnAlias - The column alias in the result-set to be processed as a scalar result
this, for method chaining
public SQLQuery.RootReturn addRoot(String tableAlias,
String entityName)
SQLQuerySQLQuery.RootReturn to allow further definition
addRoot in interface SQLQuerytableAlias - The SQL table alias to map to this entityentityName - The name of the entity.
public SQLQuery.RootReturn addRoot(String tableAlias,
Class entityType)
SQLQuerySQLQuery.RootReturn to allow further definition
addRoot in interface SQLQuerytableAlias - The SQL table alias to map to this entityentityType - The java type of the entity.
public SQLQuery addEntity(String entityName)
SQLQuerySQLQuery.addRoot(java.lang.String, java.lang.String) if you need further control of the mapping
addEntity in interface SQLQueryentityName - The entity name that is the root return of the query.
this, for method chaining
public SQLQuery addEntity(String alias,
String entityName)
SQLQuery
addEntity in interface SQLQueryalias - The SQL table aliasentityName - The entity name
this, for method chaining
public SQLQuery addEntity(String alias,
String entityName,
LockMode lockMode)
SQLQuery
addEntity in interface SQLQueryalias - The SQL table aliasentityName - The entity namelockMode - The lock mode for this return.
this, for method chainingpublic SQLQuery addEntity(Class entityType)
SQLQuery
addEntity in interface SQLQueryentityType - The java type of the entity to add as a root
this, for method chaining
public SQLQuery addEntity(String alias,
Class entityClass)
SQLQuery
addEntity in interface SQLQueryalias - The SQL table aliasentityClass - The java type of the entity to add as a root
this, for method chaining
public SQLQuery addEntity(String alias,
Class entityClass,
LockMode lockMode)
SQLQuery
addEntity in interface SQLQueryalias - The SQL table aliasentityClass - The entity namelockMode - The lock mode for this return.
this, for method chaining
public SQLQuery.FetchReturn addFetch(String tableAlias,
String ownerTableAlias,
String joinPropertyName)
SQLQuery
addFetch in interface SQLQuerytableAlias - 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.
public SQLQuery addJoin(String tableAlias,
String ownerTableAlias,
String joinPropertyName)
SQLQuery
addJoin in interface SQLQuerytableAlias - 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 chaining
public SQLQuery addJoin(String alias,
String path)
SQLQuery
addJoin in interface SQLQueryalias - The SQL table alias for the data to be mapped to this fetchpath - The association path ([owner-alias].[property-name]).
this, for method chaining
public SQLQuery addJoin(String alias,
String path,
LockMode lockMode)
SQLQuery
addJoin in interface SQLQueryalias - 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 chainingpublic SQLQuery setResultSetMapping(String name)
SQLQuery<result-set/> element in a
Hibernate hbm.xml file or through a SqlResultSetMapping annotation.
setResultSetMapping in interface SQLQueryname - The name of the mapping to use.
public SQLQuery addSynchronizedQuerySpace(String querySpace)
SQLQuery
addSynchronizedQuerySpace in interface SQLQueryquerySpace - The query space to be auto-flushed for this query.
public SQLQuery addSynchronizedEntityName(String entityName)
SQLQuerySQLQuery.addSynchronizedQuerySpace(java.lang.String) for all tables associated with the given entity.
addSynchronizedEntityName in interface SQLQueryentityName - The name of the entity upon whose defined query spaces we should additionally synchronize.
public SQLQuery addSynchronizedEntityClass(Class entityClass)
SQLQuerySQLQuery.addSynchronizedQuerySpace(java.lang.String) for all tables associated with the given entity.
addSynchronizedEntityClass in interface SQLQueryentityClass - The class of the entity upon whose defined query spaces we should additionally synchronize.
public int executeUpdate()
throws HibernateException
Query
executeUpdate in interface QueryHibernateException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||