|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sas.framework.expojo.PersistenceProvider
com.sas.framework.expojo.hibernate.HibernatePersistenceProvider
public class HibernatePersistenceProvider
Provides persistence using Hibernate.
| Field Summary | |
|---|---|
protected Session |
session
Hibernate session. |
protected SessionFactory |
sessionFactory
Hibernate session factory. |
protected Transaction |
transaction
The current transaction for the session, null if no transaction is currently associated with the session. |
| Fields inherited from class com.sas.framework.expojo.PersistenceProvider |
|---|
depth, modelExposer |
| Constructor Summary | |
|---|---|
HibernatePersistenceProvider(SessionFactory iSessionFactory)
Constructs the object giving it a SessionFactory so that it can make it's own Session(s). |
|
| Method Summary | |
|---|---|
void |
beginTx()
Begins a transaction. |
void |
close()
Closes the persistence provider. |
void |
commitTx()
Commits a transaction. |
void |
delete(java.lang.Object object)
Deletes the persistent object from the datastore. |
Session |
getSession()
Returns session |
SessionFactory |
getSessionFactory()
Returns sessionFactory |
Transaction |
getTransaction()
Returns transaction |
boolean |
hasActiveTx()
Returns true if the PersistenceProvider has an active transaction. |
void |
open()
Opens a persistence provider. |
void |
persist(java.lang.Object object)
Makes the given object persistent. |
java.lang.RuntimeException |
processException(java.lang.RuntimeException e)
Processes an exception thrown while in a transaction. |
void |
rollbackTx()
Rolls back a transaction. |
void |
setSession(Session session)
Sets session |
void |
setSessionFactory(SessionFactory sessionFactory)
Sets sessionFactory |
void |
setTransaction(Transaction transaction)
Sets transaction |
| Methods inherited from class com.sas.framework.expojo.PersistenceProvider |
|---|
setModelExposer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient Session session
protected transient SessionFactory sessionFactory
protected transient Transaction transaction
| Constructor Detail |
|---|
public HibernatePersistenceProvider(SessionFactory iSessionFactory)
| Method Detail |
|---|
public boolean hasActiveTx()
hasActiveTx in class PersistenceProviderpublic void setTransaction(Transaction transaction)
public Transaction getTransaction()
public void setSession(Session session)
public Session getSession()
public void setSessionFactory(SessionFactory sessionFactory)
public SessionFactory getSessionFactory()
public void open()
open in class PersistenceProviderpublic java.lang.RuntimeException processException(java.lang.RuntimeException e)
processException in class PersistenceProviderpublic void close()
close in class PersistenceProviderpublic void delete(java.lang.Object object)
delete in class PersistenceProviderpublic void persist(java.lang.Object object)
persist in class PersistenceProviderpublic void rollbackTx()
rollbackTx in class PersistenceProviderpublic void beginTx()
beginTx in class PersistenceProviderpublic void commitTx()
commitTx in class PersistenceProvider
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||