public class TransactionEvent extends EventObject
Broker
whose
transaction state changed.Modifier and Type | Field and Description |
---|---|
static int |
AFTER_BEGIN
Event type signifying that a transaction has just begun.
|
static int |
AFTER_COMMIT
Event type signifying that the transaction has committed.
|
static int |
AFTER_COMMIT_COMPLETE
Event type signifying that the commit has completey ended and the
transaction is no longer active.
|
static int |
AFTER_FLUSH
Event type signifying that changes have been flushed to the datastore.
|
static int |
AFTER_ROLLBACK
Event type signifying that the transaction was rolled back.
|
static int |
AFTER_ROLLBACK_COMPLETE
Event type signifying that the rollback has completey ended and the
transaction is no longer active.
|
static int |
AFTER_STATE_TRANSITIONS
Event type signifying that all state transitions have been made.
|
static int |
BEFORE_COMMIT
Event type signifying that the transaction is about to be committed.
|
static int |
BEFORE_FLUSH
Event type signifying that changes are about to be flushed to the
datastore.
|
source
Constructor and Description |
---|
TransactionEvent(Broker broker,
int type,
Collection objs,
Collection addClss,
Collection updateClss,
Collection deleteClss)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Collection |
getDeletedTypes()
Return the unmodifiable the set of classes of
persistence capable objects that were deleted in the transaction.
|
Collection |
getPersistedTypes()
Return the unmodifiable the set of classes of
persistence capable objects that were created in the transaction.
|
Collection |
getTransactionalObjects()
Return the unmodifiable set of persistence capable objects
participating in the transaction.
|
int |
getType()
Return the type of event.
|
Collection |
getUpdatedTypes()
Return the unmodifiable the set of classes of
persistence capable objects that were modified in the transaction.
|
getSource, toString
public static final int AFTER_BEGIN
public static final int BEFORE_FLUSH
public static final int AFTER_FLUSH
public static final int BEFORE_COMMIT
BEFORE_FLUSH
event for the
transaction, so that you can differentiate between flushes for commits
and other flushes.public static final int AFTER_COMMIT
public static final int AFTER_ROLLBACK
public static final int AFTER_STATE_TRANSITIONS
public static final int AFTER_COMMIT_COMPLETE
public static final int AFTER_ROLLBACK_COMPLETE
public TransactionEvent(Broker broker, int type, Collection objs, Collection addClss, Collection updateClss, Collection deleteClss)
broker
- the event sourcetype
- the event typeobjs
- transactional objectsaddClss
- classes of added instancesupdateClss
- classes of updated instancesdeleteClss
- classes of deleted instancespublic int getType()
public Collection getTransactionalObjects()
public Collection getPersistedTypes()
public Collection getUpdatedTypes()
public Collection getDeletedTypes()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.