ModeShape Distribution 3.0.0.Beta4

Interface SessionCache.PreSave

All Known Implementing Classes:
Enclosing interface:

public static interface SessionCache.PreSave

The definition of a callback that can be implemented and passed to, PreSave) and, SessionCache, PreSave), allowing the caller to recieve a hook where they can interrogate each of the changed nodes and perform additional logic prior to the actual persisting of the changes. Note that implementations are free to make additional modifications to the supplied nodes, and even create additional nodes or change persistent but unchanged nodes, as long as these operations are done within the same calling thread.

Method Summary
 void process(MutableCachedNode modifiedOrNewNode, SessionCache.SaveContext context)
          Process the supplied node prior to saving the changes.

Method Detail


void process(MutableCachedNode modifiedOrNewNode,
             SessionCache.SaveContext context)
             throws Exception
Process the supplied node prior to saving the changes. This allows implementations to use the changes to automatically adjust this node or other content.

modifiedOrNewNode - the mutable node that was changed in this session; never null
context - the context of the save operation; never null
Exception - if there is a problem during the processing

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.