Result: returns the change type this observation observes. nil if all changes on the target object are observed- (id)changeType;
Result: the selector to call back to the observer after a commit- (SEL)hasCommittedCallback;
Result: the selector to call back to the observer after a rollback- (SEL)hasRolledBackCallback;
- (id)initWithObserver:(id)observer forChangeType:(id)changeType onTarget:(id)target;
calls initWithObserver:forChangeType:onTarget:withWillCommitCallback:hasCommittedCallback:andHasRolledBackCallback: with all callbacks nil
- (id)initWithObserver:(id)observer forChangeType:(id)changeType onTarget:(id)target withHasCommittedCallback:(SEL)hcCallback;
calls initWithObserver:forChangeType:onTarget:withWillCommitCallback:hasCommittedCallback:andHasRolledBackCallback: with wcCallback and hrbCallback nil
- (id)initWithObserver:(id)observer forChangeType:(id)changeType onTarget:(id)target withHasRolledBackCallback:(SEL)hrbCallback;
calls initWithObserver:forChangeType:onTarget:withWillCommitCallback:hasCommittedCallback:andHasRolledBackCallback: with wcCallback and hcCallback nil
- (id)initWithObserver:(id)observer forChangeType:(id)changeType onTarget:(id)target withWillCommitCallback:(SEL)wcCallback;
calls initWithObserver:forChangeType:onTarget:withWillCommitCallback:hasCommittedCallback:andHasRolledBackCallback: with hcCallback and hrbCallback nil
- (id)initWithObserver:(id)observer forChangeType:(id)changeType onTarget:(id)target withWillCommitCallback:(SEL)wcCallback hasCommittedCallback:(SEL)hcCallback andHasRolledBackCallback:(SEL)hrbCallback;
all the callbacks are expected to take one parameter of type BNZTransaction
Result: a new observation object
Name Description observer the object that observes the target for changes changeType the change type that shall be observed. nil if any change on the target should be observed target the target object that shall be observed for changes. nil if all changes of the given type shall be observed wcCallback a callback called before a commit hcCallback callback called after commit hrbCallback callback called after rollback
- (BOOL)isObservationForType:(id)changeType onTarget:(id)target;
this is different to a match!
Example: imagine an observation of "FirstNameChange" on target o
while e.g., [observation observesChangesOfType:"FirstNameChange" onTarget:nil] returns true,
the this method only returns true when "FirstNameChange" and the target are really equal
- (BOOL)matches:(id)change;
Result: BOOL value, YES if this observation's target and change typew meet the change
Name Description change the change in question
- (BOOL)observeChangesOfType:(id)changeType onTarget:(id)target;
Result: BOOL value, YES if this observation's target and change typew meet the change
Name Description changeType the type in question target the target in question
Result: the observer of the observation (the observer)- (id)observer;
- setHasCommittedCallback:(SEL)hcCallback;
Result: returns self
Name Description the callback that is called after a commit. nil if observer does not want to be informed
- setHasRolledBackCallback:(SEL)hrbCallback;
Result: returns self
Name Description the callback that is called after a rollback. nil if observer does not want to be informed
- setWillCommitCallback:(SEL)wcCallback;
Result: returns self
Name Description the callback that is called before a commit. nil if observer does not want to be informed
Result: the target object that is observed. nil if all changes of the changeType on any object are observed- (id)target;
Result: the selector to call back to the observer before a commit- (SEL)willCommitCallback;
(Last Updated 8/31/2006)