|
||||||||||
| 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 Tutorials.
| Nested Class Summary | |
|---|---|
(package private) static class |
HibernateQuery.BatchResultHolder
|
| Nested classes/interfaces inherited from interface org.sqlproc.engine.SqlQuery |
|---|
SqlQuery.SqlQueryRowProcessor |
| 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) boolean |
logError
The failed SQL command should be logged. |
(package private) org.slf4j.Logger |
logger
The internal slf4j logger. |
(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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final org.slf4j.Logger logger
org.hibernate.Session session
org.hibernate.SQLQuery query
List<String> identities
Map<String,IdentitySetter> identitySetters
Map<String,Object> identityTypes
boolean logError
| 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 SqlQuerypublic SqlQuery setFetchSize(int fetchSize)
setFetchSize in interface SqlQuerypublic SqlQuery setOrdered(boolean ordered)
setOrdered in interface SqlQuery
public List list(SqlRuntimeContext runtime)
throws SqlProcessorException
list in interface SqlQuerySqlProcessorException
public int query(SqlRuntimeContext runtimeCtx,
SqlQuery.SqlQueryRowProcessor sqlQueryRowProcessor)
throws SqlProcessorException
query in interface SqlQuerySqlProcessorException
public Object unique(SqlRuntimeContext runtime)
throws SqlProcessorException
unique in interface SqlQuerySqlProcessorException
public int update(SqlRuntimeContext runtime)
throws SqlProcessorException
update in interface SqlQuerySqlProcessorExceptionprivate boolean isSetJDBCIdentity()
private 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
public List callList(SqlRuntimeContext runtime)
throws SqlProcessorException
callList in interface SqlQuerySqlProcessorException
public Object callUnique(SqlRuntimeContext runtime)
throws SqlProcessorException
callUnique in interface SqlQuerySqlProcessorException
public int callUpdate(SqlRuntimeContext runtime)
throws SqlProcessorException
callUpdate in interface SqlQuerySqlProcessorException
public Object callFunction()
throws SqlProcessorException
callFunction in interface SqlQuerySqlProcessorException
public int[] executeBatch(String[] statements)
throws SqlProcessorException
executeBatch in interface SqlQuerySqlProcessorException
protected SqlProcessorException newSqlProcessorException(org.hibernate.HibernateException ex,
String query)
public void setLogError(boolean logError)
setLogError in interface SqlQuerylogError - an indicator the failed SQL command should be logged
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||