|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.transaction.impl.ReadWriteValidatorImpl
public class 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| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.impl.TransactionValidator |
|---|
TransactionValidator.Factory |
| 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. |
protected IValidator<Notification> |
createValidator()
Creates a validator which will be responsible for the transaction validation |
void |
dispose()
Disposes me by clearing my state and cleaning up any resources that I am retaining. |
List<Notification> |
getNotificationsForPostcommit(Transaction tx)
Obtains the notifications that I need to broadcast in a post-commit resource-change event for the specified transaction. |
List<Notification> |
getNotificationsForPrecommit(Transaction tx)
Obtains the notifications that I need to broadcast in a pre-commit resource-change event for the specified transaction. |
List<Notification> |
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. |
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 TransactionValidatortransaction - the transaction (root or a nested transaction) to addpublic void remove(InternalTransaction transaction)
remove in interface TransactionValidatortransaction - the transaction (root or a nested transaction) to removepublic List<Notification> getNotificationsForValidation(Transaction tx)
TransactionValidator
getNotificationsForValidation in interface TransactionValidatortx - the transaction to be validated
null if the
transaction has not started yetpublic List<Notification> getNotificationsForPrecommit(Transaction tx)
TransactionValidator
getNotificationsForPrecommit in interface TransactionValidatortx - the transaction to be broadcast
null if the transaction has not startedpublic List<Notification> getNotificationsForPostcommit(Transaction tx)
TransactionValidator
getNotificationsForPostcommit in interface TransactionValidatortx - the transaction to be broadcast
null if the transaction has not startedpublic IStatus validate(Transaction tx)
TransactionValidator
validate in interface TransactionValidatortx - the transaction to validate
Transaction.commit(),
RollbackExceptionprotected IValidator<Notification> createValidator()
public void dispose()
TransactionValidator
dispose in interface TransactionValidator
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||