Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.impl.AbstractQueryImpl
org.hibernate.impl.SQLQueryImpl
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 |
|
SQLQuery |
|
SQLQuery |
|
SQLQuery | |
SQLQuery |
|
SQLQuery | |
SQLQuery |
|
SQLQuery | |
SQLQuery |
|
SQLQuery | |
SQLQuery |
|
SQLQuery |
|
SQLQuery |
|
int |
|
protected Map | |
QueryParameters |
|
String[] |
|
Type[] |
|
Iterator |
|
List |
|
ScrollableResults |
|
ScrollableResults |
|
Query |
|
SQLQuery |
|
protected void |
public SQLQuery addSynchronizedEntityClass(Class entityClass)
- Specified by:
- addSynchronizedEntityClass in interface SQLQuery
public SQLQuery addSynchronizedEntityName(String entityName)
- Specified by:
- addSynchronizedEntityName in interface SQLQuery
public SQLQuery addSynchronizedQuerySpace(String querySpace)
- Specified by:
- addSynchronizedQuerySpace in interface SQLQuery
public int executeUpdate() throws HibernateException
Execute the update or delete statement. The semantics are compliant with the ejb3 Query.executeUpdate() method.
- Specified by:
- executeUpdate in interface Query
- Returns:
- The number of entities updated or deleted.
- Throws:
HibernateException
-
public QueryParameters getQueryParameters(Map namedParams)
- Overrides:
- getQueryParameters in interface AbstractQueryImpl
public String[] getReturnAliases() throws HibernateException
Return the HQL select clause aliases (if any)
- Specified by:
- getReturnAliases in interface Query
- Overrides:
- getReturnAliases in interface AbstractQueryImpl
- Returns:
- an array of aliases as strings
public Type[] getReturnTypes() throws HibernateException
Return the Hibernate types of the query result set.
- Specified by:
- getReturnTypes in interface Query
- Overrides:
- getReturnTypes in interface AbstractQueryImpl
- Returns:
- an array of types
public Iterator iterate() throws HibernateException
Return the query results as an Iterator. If the query contains multiple results pre row, the results are returned in an instance of Object[].
Entities returned as results are initialized on demand. The first SQL query returns identifiers only.
- Returns:
- the result iterator
- Throws:
HibernateException
-
public List list() throws HibernateException
Return the query results as a List. If the query contains multiple results pre row, the results are returned in an instance of Object[].
- Returns:
- the result list
- Throws:
HibernateException
-
public ScrollableResults scroll() throws HibernateException
Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.
- Returns:
- the result iterator
- Throws:
HibernateException
-
- See Also:
ScrollableResults
public ScrollableResults scroll(ScrollMode scrollMode) throws HibernateException
Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.
- Returns:
- the result iterator
- Throws:
HibernateException
-
- See Also:
ScrollableResults
,ScrollMode
public Query setLockMode(String alias, LockMode lockMode)
Set the lockmode for the objects idententified by the given alias that appears in the FROM clause.
- Specified by:
- setLockMode in interface Query
- Parameters:
alias
- a query alias, or this for a collection filter
public SQLQuery setResultSetMapping(String name)
- Specified by:
- setResultSetMapping in interface SQLQuery
protected void verifyParameters()
- Overrides:
- verifyParameters in interface AbstractQueryImpl