com.triactive.jdo.sco
Class SCOProcessor

java.lang.Object
  extended bycom.triactive.jdo.sco.SCOProcessor
Direct Known Subclasses:
SCOProcessor.DateProcessor, SCOProcessor.MapProcessor, SCOProcessor.SetProcessor, SCOProcessor.SqlDateProcessor, SCOProcessor.SqlTimestampProcessor

public abstract class SCOProcessor
extends java.lang.Object

An object that helps manage SCO fields of a particular declared type. Currently, an SCO processor's only function is to serve as a factory for SCO insatnces.

Author:
Mike Martin

Nested Class Summary
static class SCOProcessor.DateProcessor
          The SCO processor for java.util.Date fields.
static class SCOProcessor.HashMapProcessor
          The SCO processor for java.util.HashMap fields.
static class SCOProcessor.HashSetProcessor
          The SCO processor for java.util.HashSet fields.
static class SCOProcessor.HashtableProcessor
          The SCO processor for java.util.Hashtable fields.
static class SCOProcessor.MapProcessor
          An SCO processor for Map fields.
static class SCOProcessor.SetProcessor
          An SCO processor for Set fields.
static class SCOProcessor.SqlDateProcessor
          The SCO processor for java.sql.Date fields.
static class SCOProcessor.SqlTimestampProcessor
          The SCO processor for java.sql.Timestamp fields.
 
Constructor Summary
SCOProcessor()
           
 
Method Summary
static SCOProcessor forFieldType(java.lang.Class c)
          Returns the SCO processor for fields of the given type.
static boolean isSecondClassMutableType(java.lang.Class c)
          Tests whether a given type represents a supported second-class mutable type.
abstract  SCO newSCOInstance(java.lang.Object owner, java.lang.String fieldName, java.lang.Object value)
          Returns a new SCO instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCOProcessor

public SCOProcessor()
Method Detail

isSecondClassMutableType

public static boolean isSecondClassMutableType(java.lang.Class c)
Tests whether a given type represents a supported second-class mutable type.

Parameters:
c - The class to be tested.
Returns:
true if fields declared as type c are supported as second-class mutable objects, false otherwise.

forFieldType

public static SCOProcessor forFieldType(java.lang.Class c)
Returns the SCO processor for fields of the given type.

Parameters:
c - The type of field.
Returns:
The corresponding SCO processor.

newSCOInstance

public abstract SCO newSCOInstance(java.lang.Object owner,
                                   java.lang.String fieldName,
                                   java.lang.Object value)
Returns a new SCO instance. The returned instance is owned by the specified owner but has not been assigned to the corresponding field.

Parameters:
owner - The first-class object that will own the new second-class object.
fieldName - The name of the field in the owning object.
value - The initial value of the new object.
Returns:
A new SCO instance.


Copyright © 2001-2007 The TJDO Project All Rights Reserved.