public class HibernateTopiaSqlSupport extends Object implements TopiaSqlSupport
| Modifier and Type | Class and Description |
|---|---|
static class |
HibernateTopiaSqlSupport.HibernateSqlWork |
static class |
HibernateTopiaSqlSupport.HibernateTopiaSqlQueryWork<O> |
static class |
HibernateTopiaSqlSupport.HibernateTopiaSqlWork |
| Modifier and Type | Field and Description |
|---|---|
protected TopiaHibernateSupport |
hibernateSupport |
protected org.hibernate.Session |
session |
| Constructor and Description |
|---|
HibernateTopiaSqlSupport(org.hibernate.Session session) |
HibernateTopiaSqlSupport(TopiaHibernateSupport hibernateSupport) |
| Modifier and Type | Method and Description |
|---|---|
void |
doSqlWork(TopiaSqlWork sqlWork)
Runs the given SQL work on the current context
|
void |
executeSql(String sqlScript)
Execute a given SQL code inside this transaction.
|
<O> List<O> |
findMultipleResult(TopiaSqlQuery<O> query)
Runs the given SQL query and return all his result if there is some.
|
<O> O |
findSingleResult(TopiaSqlQuery<O> query)
Runs the given SQL query and return its first result if there is some.
|
protected org.hibernate.Session |
getHibernateSession() |
protected TopiaHibernateSupport hibernateSupport
protected org.hibernate.Session session
public HibernateTopiaSqlSupport(TopiaHibernateSupport hibernateSupport)
public HibernateTopiaSqlSupport(org.hibernate.Session session)
public void executeSql(String sqlScript)
TopiaSqlSupportexecuteSql in interface TopiaSqlSupportsqlScript - the sql script to executeprotected org.hibernate.Session getHibernateSession()
public void doSqlWork(TopiaSqlWork sqlWork)
TopiaSqlSupportdoSqlWork in interface TopiaSqlSupportsqlWork - the SQL work instance to executepublic <O> O findSingleResult(TopiaSqlQuery<O> query) throws TopiaException
TopiaSqlSupportfindSingleResult in interface TopiaSqlSupportO - type of resultquery - query to playnull if none found.TopiaException - for any pbpublic <O> List<O> findMultipleResult(TopiaSqlQuery<O> query) throws TopiaException
TopiaSqlSupportfindMultipleResult in interface TopiaSqlSupportO - type of resultquery - query to playTopiaException - for any pbCopyright © 2004–2018 CodeLutin. All rights reserved.