|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.impl.AbstractQueryImpl org.hibernate.impl.SQLQueryImpl
Implements SQL query passthrough.
SELECT {person}.NAME AS {person.name}, {person}.AGE AS {person.age}, {person}.SEX AS {person.sex} FROM PERSON {person} WHERE {person}.NAME LIKE 'Hiber%'
Field Summary |
Fields inherited from class org.hibernate.impl.AbstractQueryImpl |
parameterMetadata, session |
Method Summary | |
SQLQuery |
addEntity(Class entityClass)
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 |
addJoin(String alias,
String path)
Declare a "joined" entity |
SQLQuery |
addJoin(String alias,
String path,
LockMode lockMode)
Declare a "joined" entity, specifying a lock mode |
SQLQuery |
addScalar(String columnAlias)
Declare a scalar query. |
SQLQuery |
addScalar(String columnAlias,
Type type)
Declare a scalar query result |
SQLQuery |
addSynchronizedEntityClass(Class entityClass)
Adds an entity name or auto-flush synchronization. |
SQLQuery |
addSynchronizedEntityName(String entityName)
Adds an entity name or auto-flush synchronization. |
SQLQuery |
addSynchronizedQuerySpace(String querySpace)
Adds a query space for auto-flush synchronization. |
int |
executeUpdate()
Execute the update or delete statement. |
protected Map |
getLockModes()
|
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. |
SQLQuery |
setResultSetMapping(String name)
Use a predefined named ResultSetMapping |
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
HibernateException
public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException
Query
HibernateException
ScrollableResults
,
ScrollMode
public ScrollableResults scroll() throws HibernateException
Query
HibernateException
ScrollableResults
public Iterator iterate() throws HibernateException
Query
HibernateException
public QueryParameters getQueryParameters(Map namedParams)
getQueryParameters
in class AbstractQueryImpl
protected void verifyParameters()
AbstractQueryImpl
verifyParameters
in class AbstractQueryImpl
public String[] getReturnAliases() throws HibernateException
Query
getReturnAliases
in interface Query
getReturnAliases
in class AbstractQueryImpl
HibernateException
public Type[] getReturnTypes() throws HibernateException
Query
getReturnTypes
in interface Query
getReturnTypes
in class AbstractQueryImpl
HibernateException
public Query setLockMode(String alias, LockMode lockMode)
Query
setLockMode
in interface Query
alias
- a query alias, or this for a collection filterprotected Map getLockModes()
getLockModes
in class AbstractQueryImpl
public SQLQuery addScalar(String columnAlias, Type type)
SQLQuery
public SQLQuery addScalar(String columnAlias)
SQLQuery
public SQLQuery addJoin(String alias, String path)
SQLQuery
public SQLQuery addEntity(Class entityClass)
SQLQuery
public SQLQuery addEntity(String entityName)
SQLQuery
public SQLQuery addEntity(String alias, String entityName)
SQLQuery
public SQLQuery addEntity(String alias, Class entityClass)
SQLQuery
public SQLQuery addJoin(String alias, String path, LockMode lockMode)
SQLQuery
public SQLQuery addEntity(String alias, String entityName, LockMode lockMode)
SQLQuery
public SQLQuery addEntity(String alias, Class entityClass, LockMode lockMode)
SQLQuery
public SQLQuery setResultSetMapping(String name)
SQLQuery
setResultSetMapping
in interface SQLQuery
public SQLQuery addSynchronizedQuerySpace(String querySpace)
SQLQuery
addSynchronizedQuerySpace
in interface SQLQuery
querySpace
- The query space to be auto-flushed for this query.
public SQLQuery addSynchronizedEntityName(String entityName)
SQLQuery
addSynchronizedEntityName
in interface SQLQuery
entityName
- The name of the entity upon whose defined
query spaces we should additionally synchronize.
public SQLQuery addSynchronizedEntityClass(Class entityClass)
SQLQuery
addSynchronizedEntityClass
in interface SQLQuery
entityClass
- The class of the entity upon whose defined
query spaces we should additionally synchronize.
public int executeUpdate() throws HibernateException
Query
executeUpdate
in interface Query
HibernateException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |