public class HibernateQuery extends Object implements SqlQuery
For more info please see the Tutorials.
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
HibernateQuery.BatchResultHolder |
SqlQuery.SqlQueryRowProcessor| Modifier and Type | Field and Description |
|---|---|
(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 and Description |
|---|
HibernateQuery(org.hibernate.Session session,
org.hibernate.SQLQuery query)
Creates a new instance of this adapter.
|
final org.slf4j.Logger logger
org.hibernate.Session session
org.hibernate.SQLQuery query
Map<String,IdentitySetter> identitySetters
boolean logError
public HibernateQuery(org.hibernate.Session session,
org.hibernate.SQLQuery query)
session - the Hibernate Session instancequery - the Hibernate SQLQuery instancepublic SqlQuery setSqlControl(SqlControl sqlControl)
setSqlControl in interface SqlQuerypublic SqlQuery setOrdered(boolean ordered)
setOrdered in interface SqlQuerypublic List<Map<String,Object>> list(SqlRuntimeContext runtime) throws SqlProcessorException
list in interface SqlQuerySqlProcessorExceptionpublic int query(SqlRuntimeContext runtimeCtx, SqlQuery.SqlQueryRowProcessor sqlQueryRowProcessor) throws SqlProcessorException
query in interface SqlQuerySqlProcessorExceptionpublic Map<String,Object> unique(SqlRuntimeContext runtime) throws SqlProcessorException
unique in interface SqlQuerySqlProcessorExceptionpublic 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 setParameter(String name, Object val) throws SqlProcessorException
setParameter in interface SqlQuerySqlProcessorExceptionpublic SqlQuery setParameter(String name, Object val, Object type, Class<?>... moreTypes) throws SqlProcessorException
setParameter in interface SqlQuerySqlProcessorExceptionpublic SqlQuery setParameterList(String name, Object[] vals) throws SqlProcessorException
setParameterList in interface SqlQuerySqlProcessorExceptionpublic SqlQuery setParameterList(String name, Object[] vals, Object type, Class<?>... moreTypes) throws SqlProcessorException
setParameterList in interface SqlQuerySqlProcessorExceptionpublic List<Map<String,Object>> callList(SqlRuntimeContext runtime) throws SqlProcessorException
callList in interface SqlQuerySqlProcessorExceptionpublic Map<String,Object> callUnique(SqlRuntimeContext runtime) throws SqlProcessorException
callUnique in interface SqlQuerySqlProcessorExceptionpublic int callUpdate(SqlRuntimeContext runtime) throws SqlProcessorException
callUpdate in interface SqlQuerySqlProcessorExceptionpublic Map<String,Object> callFunction() throws SqlProcessorException
callFunction in interface SqlQuerySqlProcessorExceptionpublic int[] executeBatch(String[] statements) throws SqlProcessorException
executeBatch in interface SqlQuerySqlProcessorExceptionprotected 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 loggedCopyright © 2016. All rights reserved.