|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.transaction.impl.ReadWriteValidatorImpl
A validator for read/write transactions. It provides all of the notifications (in order) that occurred during the transaction, and validates them to detect changes that would violate model integrity.
A read/write validator should be created for the root transaction of any
nested read/write transaction structure, when the root transaction is
activated. As child transactions are activated, they must be
added
to me so that I may correctly track
which notifications were received during which transaction, and at which
time relative to the start and completion of nested transactions.
Whenever a transaction (nested or otherwise) is rolled back, it must be
removed
from me so that I may forget
the notifications received for any changes that it or its nested transactions
made.
ReadOnlyValidatorImpl
Field Summary |
---|
Fields inherited from interface org.eclipse.emf.transaction.impl.TransactionValidator |
---|
NULL |
Constructor Summary | |
---|---|
ReadWriteValidatorImpl()
Initializes me. |
Method Summary | |
---|---|
void |
add(InternalTransaction transaction)
Adds the specified transaction to me for validation. |
void |
dispose()
Disposes me by clearing my state and cleaning up any resources that I am retaining. |
java.util.List |
getNotificationsForPostcommit(Transaction tx)
Obtains the notifications that I need to broadcast in a post-commit resource-change event for the specified transaction. |
java.util.List |
getNotificationsForPrecommit(Transaction tx)
Obtains the notifications that I need to broadcast in a pre-commit resource-change event for the specified transaction. |
java.util.List |
getNotificationsForValidation(Transaction tx)
Obtains the notifications received, in order, during the execution of the (possibly nested) transaction(s) that I am validating. |
void |
remove(InternalTransaction transaction)
Removes the specified transaction from me. |
org.eclipse.core.runtime.IStatus |
validate(Transaction tx)
Performs the validation step of a commit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ReadWriteValidatorImpl()
Method Detail |
public void add(InternalTransaction transaction)
add
in interface TransactionValidator
transaction
- the transaction (root or a nested transaction) to addpublic void remove(InternalTransaction transaction)
remove
in interface TransactionValidator
transaction
- the transaction (root or a nested transaction) to removepublic java.util.List getNotificationsForValidation(Transaction tx)
TransactionValidator
getNotificationsForValidation
in interface TransactionValidator
tx
- the transaction to be validated
null
if the
transaction has not started yetpublic java.util.List getNotificationsForPrecommit(Transaction tx)
TransactionValidator
getNotificationsForPrecommit
in interface TransactionValidator
tx
- the transaction to be broadcast
null
if the transaction has not startedpublic java.util.List getNotificationsForPostcommit(Transaction tx)
TransactionValidator
getNotificationsForPostcommit
in interface TransactionValidator
tx
- the transaction to be broadcast
null
if the transaction has not startedpublic org.eclipse.core.runtime.IStatus validate(Transaction tx)
TransactionValidator
validate
in interface TransactionValidator
tx
- the transaction to validate
Transaction.commit()
,
RollbackException
public void dispose()
TransactionValidator
dispose
in interface TransactionValidator
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |