|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sqlproc.engine.hibernate.HibernateQuery
public class HibernateQuery
The Hibernate stack implementation of the SQL Engine query contract. In fact it's an adapter the internal Hibernate stuff.
For more info please see the Reference Guide or the tutorials.
| Field Summary | |
|---|---|
(package private) List<String> |
identities
The collection of all (auto-generated) identities. |
(package private) Map<String,IdentitySetter> |
identitySetters
The collection of all identities setters. |
(package private) Map<String,Object> |
identityTypes
The collection of all identities types. |
(package private) org.hibernate.SQLQuery |
query
The Hibernate SQLQuery instance. |
(package private) org.hibernate.Session |
session
The Hibernate Session instance. |
| Constructor Summary | |
|---|---|
HibernateQuery(org.hibernate.Session session,
org.hibernate.SQLQuery query)
Creates a new instance of this adapter. |
|
| Method Summary | |
|---|---|
SqlQuery |
addScalar(String columnAlias)
|
SqlQuery |
addScalar(String columnAlias,
Object type)
|
private void |
doIdentitySelect(String identityName)
Runs the select to obtain the value of auto-generated identity. |
int |
executeUpdate()
|
Object |
getQuery()
|
List |
list()
|
SqlQuery |
setFirstResult(int firstResult)
|
SqlQuery |
setMaxResults(int maxResults)
|
SqlQuery |
setParameter(String name,
Object val)
|
SqlQuery |
setParameter(String name,
Object val,
Object type)
|
SqlQuery |
setParameterList(String name,
Object[] vals)
|
SqlQuery |
setParameterList(String name,
Object[] vals,
Object type)
|
SqlQuery |
setTimeout(int timeout)
|
Object |
uniqueResult()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
org.hibernate.Session session
org.hibernate.SQLQuery query
List<String> identities
Map<String,IdentitySetter> identitySetters
Map<String,Object> identityTypes
| Constructor Detail |
|---|
public HibernateQuery(org.hibernate.Session session,
org.hibernate.SQLQuery query)
session - the Hibernate Session instancequery - the Hibernate SQLQuery instance| Method Detail |
|---|
public Object getQuery()
getQuery in interface SqlQuerypublic SqlQuery setTimeout(int timeout)
setTimeout in interface SqlQuerypublic SqlQuery setFirstResult(int firstResult)
setFirstResult in interface SqlQuerypublic SqlQuery setMaxResults(int maxResults)
setMaxResults in interface SqlQuery
public List list()
throws SqlProcessorException
list in interface SqlQuerySqlProcessorException
public Object uniqueResult()
throws SqlProcessorException
uniqueResult in interface SqlQuerySqlProcessorException
public int executeUpdate()
throws SqlProcessorException
executeUpdate in interface SqlQuerySqlProcessorExceptionprivate void doIdentitySelect(String identityName)
identityName - the identity name from the META SQL statementpublic SqlQuery addScalar(String columnAlias)
addScalar in interface SqlQuery
public SqlQuery addScalar(String columnAlias,
Object type)
addScalar in interface SqlQuery
public SqlQuery setParameter(String name,
Object val)
throws SqlProcessorException
setParameter in interface SqlQuerySqlProcessorException
public SqlQuery setParameter(String name,
Object val,
Object type)
throws SqlProcessorException
setParameter in interface SqlQuerySqlProcessorException
public SqlQuery setParameterList(String name,
Object[] vals)
throws SqlProcessorException
setParameterList in interface SqlQuerySqlProcessorException
public SqlQuery setParameterList(String name,
Object[] vals,
Object type)
throws SqlProcessorException
setParameterList in interface SqlQuerySqlProcessorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||