| |
|
| java.lang.Object java.util.EventObject org.apache.openjpa.event.TransactionEvent
TransactionEvent | public class TransactionEvent extends EventObject (Code) | | A transactional event. The event source is the
Broker whose
transaction state changed.
since: 0.3.0 author: Abe White |
Field Summary | |
final public static int | AFTER_BEGIN Event type signifying that a transaction has just begun. | final public static int | AFTER_COMMIT Event type signifying that the transaction has committed. | final public static int | AFTER_COMMIT_COMPLETE Event type signifying that the commit has completey ended and the
transaction is no longer active. | final public static int | AFTER_FLUSH Event type signifying that changes have been flushed to the datastore. | final public static int | AFTER_ROLLBACK Event type signifying that the transaction was rolled back. | final public static int | AFTER_ROLLBACK_COMPLETE Event type signifying that the rollback has completey ended and the
transaction is no longer active. | final public static int | AFTER_STATE_TRANSITIONS Event type signifying that all state transitions have been made. | final public static int | BEFORE_COMMIT Event type signifying that the transaction is about to be committed. | final public static int | BEFORE_FLUSH Event type signifying that changes are about to be flushed to the
datastore. |
Method Summary | |
public Collection | getDeletedTypes() Return the unmodifiable the set of classes of
persistence capable objects that were deleted in the transaction. | public Collection | getPersistedTypes() Return the unmodifiable the set of classes of
persistence capable objects that were created in the transaction. | public Collection | getTransactionalObjects() Return the unmodifiable set of persistence capable objects
participating in the transaction. | public int | getType() Return the type of event. | public Collection | getUpdatedTypes() Return the unmodifiable the set of classes of
persistence capable objects that were modified in the transaction. |
AFTER_BEGIN | final public static int AFTER_BEGIN(Code) | | Event type signifying that a transaction has just begun.
|
AFTER_COMMIT | final public static int AFTER_COMMIT(Code) | | Event type signifying that the transaction has committed.
|
AFTER_COMMIT_COMPLETE | final public static int AFTER_COMMIT_COMPLETE(Code) | | Event type signifying that the commit has completey ended and the
transaction is no longer active.
|
AFTER_FLUSH | final public static int AFTER_FLUSH(Code) | | Event type signifying that changes have been flushed to the datastore.
This event is only fired if flushing is successful.
|
AFTER_ROLLBACK | final public static int AFTER_ROLLBACK(Code) | | Event type signifying that the transaction was rolled back.
|
AFTER_ROLLBACK_COMPLETE | final public static int AFTER_ROLLBACK_COMPLETE(Code) | | Event type signifying that the rollback has completey ended and the
transaction is no longer active.
|
AFTER_STATE_TRANSITIONS | final public static int AFTER_STATE_TRANSITIONS(Code) | | Event type signifying that all state transitions have been made.
|
BEFORE_COMMIT | final public static int BEFORE_COMMIT(Code) | | Event type signifying that the transaction is about to be committed.
This will be fired before the
TransactionEvent.BEFORE_FLUSH event for the
transaction, so that you can differentiate between flushes for commits
and other flushes.
|
BEFORE_FLUSH | final public static int BEFORE_FLUSH(Code) | | Event type signifying that changes are about to be flushed to the
datastore. This does not necessarily mean that a commit is taking place.
|
TransactionEvent | public TransactionEvent(Broker broker, int type, Collection objs, Collection addClss, Collection updateClss, Collection deleteClss)(Code) | | Constructor.
Parameters: broker - the event source Parameters: type - the event type Parameters: objs - transactional objects Parameters: addClss - classes of added instances Parameters: updateClss - classes of updated instances Parameters: deleteClss - classes of deleted instances |
getDeletedTypes | public Collection getDeletedTypes()(Code) | | Return the unmodifiable the set of classes of
persistence capable objects that were deleted in the transaction.
|
getPersistedTypes | public Collection getPersistedTypes()(Code) | | Return the unmodifiable the set of classes of
persistence capable objects that were created in the transaction.
|
getTransactionalObjects | public Collection getTransactionalObjects()(Code) | | Return the unmodifiable set of persistence capable objects
participating in the transaction. This set will contain all dirty
objects, but may not contain clean objects.
|
getType | public int getType()(Code) | | Return the type of event.
|
getUpdatedTypes | public Collection getUpdatedTypes()(Code) | | Return the unmodifiable the set of classes of
persistence capable objects that were modified in the transaction.
|
|
|
|