public abstract class CascadeWorker<T extends DBObject>
extends java.lang.Object
| Constructor and Description | 
|---|
CascadeWorker(DBObjectProvider pro)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected CascadeAction | 
cascadeDelete(DBObjectID removed,
             DBObject referer,
             T obj)
Cascade deletes the given removed object. 
 | 
CascadeAction | 
cascadeDelete(DBObject removed,
             T obj)
Cascade deletes the given removed object. 
 | 
protected CascadeAction | 
cascadePropertyChange(Difference objDiff,
                     java.lang.String propName,
                     java.lang.Object oldValue,
                     java.lang.Object newValue,
                     T obj)
Process the given difference from a dependent object that is being
 updated. 
 | 
CascadeAction | 
cascadeUpdate(Difference objDiff,
             T obj)
Cascades the given object difference to an object this CascadeWorker
 is responsible for. 
 | 
java.util.Set<java.lang.String> | 
getCascadeProperties()
Gets the property names that (if changed on any object) could
 require cascade work to be done by this processor. 
 | 
protected java.util.logging.Logger | 
getLogger()  | 
protected DBObjectProvider | 
getProvider()  | 
protected CascadeAction | 
removeReference(DBObjectID removed,
               DBObject referer,
               PropertyInfo info)
This method is called when a reference is found to a deleted object. 
 | 
public CascadeWorker(DBObjectProvider pro)
protected final DBObjectProvider getProvider()
protected final java.util.logging.Logger getLogger()
public CascadeAction cascadeDelete(DBObject removed, T obj) throws DBException
removed - the object that we are cascading the delete ofobj - the object to cascade toDBException - if the delete should be completely aborted. As this
 aborts the entire operation it should only be used for terminal errors.
 This should not throw a CascadeRequiredException, that is handled by
 the framework if an update is required.protected final CascadeAction cascadeDelete(DBObjectID removed, DBObject referer, T obj) throws DBException
removed - the object that we are cascading the delete ofreferer - the object to cascade toobj - the top level object that owns the referer (could be the
 referer)DBException - if the delete should be completely aborted. As this
 aborts the entire operation it should only be used for terminal errors.
 This should not throw a CascadeRequiredException, that is handled by
 the framework if an update is required.protected CascadeAction removeReference(DBObjectID removed, DBObject referer, PropertyInfo info) throws DBException
Note: this method will only be called if a property is found on this object (not its children) to the deleted object.
removed - the id of the deleted objectreferer - the object that has a reference to the deleted objectinfo - the PropertyInfo for the property that is the referenceDBException - if the update should be completely aborted. As this
 aborts the entire operation it should only be used for terminal errors.
 This should not throw a CascadeRequiredException, that is handled by
 the framework if an update is required.public CascadeAction cascadeUpdate(Difference objDiff, T obj) throws DBException
objDiff - the changes to cascadeobj - a single object that this worker is responsible for
 cascading to.DBException - if the update should be completely aborted. As this
 aborts the entire operation it should only be used for terminal errors.
 This should not throw a CascadeRequiredException, that is handled by
 the framework if an update is required.protected CascadeAction cascadePropertyChange(Difference objDiff, java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue, T obj) throws DBException
objDiff - the full difference for the updated objectpropName - the name of the changed property we are cascadingoldValue - the old property valuenewValue - the new property valueobj - the object to cascade the change toDBException - if the update should be completely aborted. As this
 aborts the entire operation it should only be used for terminal errors.
 This should not throw a CascadeRequiredException, that is handled by
 the framework if an update is required.public java.util.Set<java.lang.String> getCascadeProperties()