org.apache.jdo.impl.state
Class SCOProcessor.MapProcessor

java.lang.Object
  extended byorg.apache.jdo.impl.state.SCOProcessor.Processor
      extended byorg.apache.jdo.impl.state.SCOProcessor.MapProcessor
Enclosing class:
SCOProcessor

class SCOProcessor.MapProcessor
extends SCOProcessor.Processor

Processor for trackUpdates request for SCOMap.


Constructor Summary
(package private) SCOProcessor.MapProcessor()
           
 
Method Summary
(package private)  void assertSCOElementType(java.lang.Object o, JDOField jdoField)
          Assert key and value type of an SCO Map.
(package private)  SCO getSCOField(java.lang.Object o, JDOField jdoField, PersistenceManagerInternal pm)
          Replace field reference that contain java.util SCO instances with tracked SCOs.
(package private)  void trackUpdates(StateManagerImpl sm, int field, SCO sco)
          Makes newly added instances to an SCO Map auto-persistent and fixes ownership on referenced SCO instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCOProcessor.MapProcessor

SCOProcessor.MapProcessor()
Method Detail

trackUpdates

void trackUpdates(StateManagerImpl sm,
                  int field,
                  SCO sco)
Makes newly added instances to an SCO Map auto-persistent and fixes ownership on referenced SCO instances.

Specified by:
trackUpdates in class SCOProcessor.Processor
Parameters:
sm - - StateManagerImpl instance that requested processing.
field - the field number associated with this SCO.
sco - Object to process.

getSCOField

SCO getSCOField(java.lang.Object o,
                JDOField jdoField,
                PersistenceManagerInternal pm)
Replace field reference that contain java.util SCO instances with tracked SCOs. No recursion is performed on this operation.

Specified by:
getSCOField in class SCOProcessor.Processor
Parameters:
o - Object to be replaced with tracked SCO instance.
jdoField - the JDOField associated with this number.
pm - the PersistenceManagerInternal instance associated with the caller.

assertSCOElementType

void assertSCOElementType(java.lang.Object o,
                          JDOField jdoField)
Assert key and value type of an SCO Map.

Specified by:
assertSCOElementType in class SCOProcessor.Processor
Parameters:
o - Object to be tested.
jdoField - the corresponding JDOField element.
Throws:
javax.jdo.JDOUserException - if assertion fails.