com.tc.object.applicator
Class BaseApplicator

java.lang.Object
  extended by com.tc.object.applicator.BaseApplicator
All Implemented Interfaces:
ChangeApplicator

public abstract class BaseApplicator
extends java.lang.Object
implements ChangeApplicator

This class provides facilities for use in implementing applicators.


Field Summary
protected  DNAEncoding encoding
          The encoding to use when reading/writing DNA
 
Constructor Summary
protected BaseApplicator(DNAEncoding encoding, TCLogger logger)
          Construct a BaseApplicator with an encoding to use when reading/writing DNA
 
Method Summary
protected  java.lang.Object getDehydratableObject(java.lang.Object pojo, ApplicatorObjectManager objectManager)
          Get an ObjectID or literal value for the given pojo
protected  TCLogger getLogger()
           
protected  boolean isLiteralInstance(java.lang.Object pojo)
          Determine whether the pojo is a literal instance
protected  boolean isPortableReference(java.lang.Class c)
          Determine whether this class is portable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tc.object.applicator.ChangeApplicator
dehydrate, getNewInstance, getPortableObjects, hydrate
 

Field Detail

encoding

protected final DNAEncoding encoding
The encoding to use when reading/writing DNA

Constructor Detail

BaseApplicator

protected BaseApplicator(DNAEncoding encoding,
                         TCLogger logger)
Construct a BaseApplicator with an encoding to use when reading/writing DNA

Parameters:
encoding - DNA encoding to use
Method Detail

getLogger

protected TCLogger getLogger()

getDehydratableObject

protected final java.lang.Object getDehydratableObject(java.lang.Object pojo,
                                                       ApplicatorObjectManager objectManager)
Get an ObjectID or literal value for the given pojo

Parameters:
pojo - Object instance
objectManager - Client-side object lookup
Returns:
ObjectID representing pojo, or the pojo itself if its a literal, or null if it's a non-portable object

isLiteralInstance

protected final boolean isLiteralInstance(java.lang.Object pojo)
Determine whether the pojo is a literal instance

Parameters:
pojo - Object to examine
Returns:
True if literal

isPortableReference

protected boolean isPortableReference(java.lang.Class c)
Determine whether this class is portable

Parameters:
c - The class
Returns:
True if portable


Copyright © 2010 Terracotta, Inc.. All Rights Reserved.