|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@StableMinor(version="4.1", sinceVersion="4.0") public interface ITransaction
Represents a transaction that offers persistence access. An instance of transaction is not thread-safe.
Method Summary | |
---|---|
boolean |
addObserver(ITransactionObserver observer)
Adds an observer for this transaction. |
void |
begin()
|
void |
commit()
|
void |
dispose()
|
Object |
getAttribute(String name)
Returns the value of the named attribute, or null if no
attribute of the given name exists. |
ITransaction |
getByConnectionId(String id)
Returns an ITransaction that represents the same transaction but
that returns the connection with the given id as default. |
boolean |
isActive()
Returns true if the transaction is currently active, false otherwise. |
void |
removeAttribute(String name)
Removes an attribute from this transaction. |
boolean |
removeObserver(ITransactionObserver observer)
Removes an observer for this transaction. |
void |
rollback()
|
void |
setAttribute(String name,
Object value)
Stores an attribute in this transaction. |
Method Detail |
---|
void begin() throws DaoException
DaoException
void commit() throws DaoException
DaoException
void rollback() throws DaoException
DaoException
void dispose() throws DaoException
DaoException
boolean isActive()
boolean addObserver(ITransactionObserver observer) throws PortalException
observer
- the observer.
PortalException
boolean removeObserver(ITransactionObserver observer) throws PortalException
observer
- the observer.
PortalException
ITransaction getByConnectionId(String id) throws DaoException
ITransaction
that represents the same transaction but
that returns the connection with the given id as default. How the id
represents the connection is defined by the concrete class that
implements this interface.
id
- the connection id.
DaoException
Object getAttribute(String name)
null
if no
attribute of the given name exists.
Different transaction instances that refer to the same transaction
(see getByConnectionId(String)
) share the same attributes.
name
- the name of the attribute.
void setAttribute(String name, Object value)
null
, the effect is the same as calling
removeAttribute(String)
.
name
- the name of the attribute.value
- the value to be stored.void removeAttribute(String name)
name
- the name of the attribute.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |