|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.subshell.persistence.hibernate.HibernateTransaction
public class HibernateTransaction
Transaction implementation using Hibernate.
| Method Summary | ||
|---|---|---|
void |
commit()
Commits this Transaction. |
|
|
create(T o)
Creates an object in the database. |
|
|
delete(T o)
Deletes a persistent object from the database. |
|
org.hibernate.Session |
getSession()
Returns this HibernateTransaction's internal Session. |
|
boolean |
isCommitted()
Returns whether this Transaction has been committed/rolled back. |
|
|
isPersistent(T o)
Returns whether an object is persistent. |
|
|
load(Class<T> clazz,
Serializable id)
Loads an object from the database. |
|
void |
rollback()
Rolls back this Transaction. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public <T> T load(Class<T> clazz,
Serializable id)
throws PersistenceException
Transaction
load in interface Transactionclazz - the object's classid - the object's ID
PersistenceException - when loading the object fails
public <T> Serializable create(T o)
throws PersistenceException
Transaction
create in interface Transactiono - the object to create
PersistenceException - when creating the object fails
public <T> void delete(T o)
throws PersistenceException
Transaction
delete in interface Transactiono - the object to delete
PersistenceException - when deleting the object fails
public <T> boolean isPersistent(T o)
throws PersistenceException
Transaction
isPersistent in interface TransactionPersistenceException - when there is a persistence-related error
public void commit()
throws PersistenceException
Transaction
commit in interface TransactionPersistenceException - when committing this Transaction fails
public void rollback()
throws PersistenceException
Transaction
rollback in interface TransactionPersistenceException - when rolling back this Transaction failspublic boolean isCommitted()
Transaction
isCommitted in interface Transaction
public org.hibernate.Session getSession()
throws org.hibernate.HibernateException,
PersistenceException
Session.
This method should be used by persistence mappers only.
org.hibernate.HibernateException
PersistenceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||