public interface ITransaction extends Closeable
This interface will be replaced by ITransaction
in a future release.
Modifier and Type | Method and Description |
---|---|
boolean |
addObserver(ITransactionObserver observer)
Adds an observer for this transaction.
|
void |
begin() |
void |
close()
Closes this transaction, rolling back any changes not committed by a previous call to
commit() , and
removes any association of this transaction from the current thread. |
void |
commit() |
void |
dispose()
Deprecated.
since 8.0.0 replaced by
close() for compatibility with try-with-resources
statements. |
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.
|
void begin() throws DaoException
DaoException
void commit() throws DaoException
DaoException
void rollback() throws DaoException
DaoException
@Deprecated void dispose() throws DaoException
close()
for compatibility with try-with-resources
statements.DaoException
void close()
commit()
, and
removes any association of this transaction from the current thread.close
in interface AutoCloseable
close
in interface Closeable
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.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.