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

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

class SCOProcessor.CollectionProcessor
extends SCOProcessor.Processor

Processor for trackUpdates request for SCOCollection.


Constructor Summary
(package private) SCOProcessor.CollectionProcessor()
           
 
Method Summary
(package private)  void assertSCOElementType(java.lang.Object o, JDOField jdoField)
          Assert element type of an SCO Collection.
(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 Collection 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.CollectionProcessor

SCOProcessor.CollectionProcessor()
Method Detail

trackUpdates

void trackUpdates(StateManagerImpl sm,
                  int field,
                  SCO sco)
Makes newly added instances to an SCO Collection 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 element type of an SCO Collection.

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.