com.sun.mdm.index.survivor.impl
Class DefaultSurvivorHelper

java.lang.Object
  extended bycom.sun.mdm.index.survivor.AbstractSurvivorHelper
      extended bycom.sun.mdm.index.survivor.impl.DefaultSurvivorHelper
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DefaultSurvivorHelper
extends AbstractSurvivorHelper

Default survivor helper implementation, using ePath

See Also:
Serialized Form

Field Summary
protected  java.util.Map mEPathCache
          pre-parse epaths and cache the ePath objects here
 
Fields inherited from class com.sun.mdm.index.survivor.AbstractSurvivorHelper
mFieldCache, mStrategyCache
 
Constructor Summary
DefaultSurvivorHelper()
          Creates new DefaultSurvivorHelper
 
Method Summary
protected  EPath getEPath(java.lang.String s)
           
 SystemFieldListMap getSystemFields(EnterpriseObject rec, java.lang.String candidateId)
          returns a mapping of system field values for the candidate field
 void init(SurvivorHelperConfig config)
           
 ObjectNode setCandidateFieldValue(ObjectNode eo, SystemField candidateField)
          sets the candidate field on the omega object using the given value
 
Methods inherited from class com.sun.mdm.index.survivor.AbstractSurvivorHelper
clone, executeStrategy, getCandidateFieldNames, getStrategy, getSystemFieldMeta, setCache
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mEPathCache

protected java.util.Map mEPathCache
pre-parse epaths and cache the ePath objects here

Constructor Detail

DefaultSurvivorHelper

public DefaultSurvivorHelper()
Creates new DefaultSurvivorHelper

Method Detail

getEPath

protected EPath getEPath(java.lang.String s)
                  throws EPathException
Throws:
EPathException

getSystemFields

public SystemFieldListMap getSystemFields(EnterpriseObject rec,
                                          java.lang.String candidateId)
                                   throws SurvivorCalculationException,
                                          SystemObjectException
returns a mapping of system field values for the candidate field

Specified by:
getSystemFields in class AbstractSurvivorHelper
Parameters:
candidateId - candidate field name
rec - omega object
Returns:
Mapping of system fields using system id as Key. Key: system id Value: collection of SystemField value objects return null if error getting system fields
Throws:
SurvivorCalculationException - unexpected value
SystemObjectException - error accessing entity object

init

public void init(SurvivorHelperConfig config)
          throws StrategyCreationException,
                 HelperCreationException
Description copied from class: AbstractSurvivorHelper
initialize the helper using a configuration object

Overrides:
init in class AbstractSurvivorHelper
Parameters:
config - configuration object
Throws:
StrategyCreationException - exception when creating a survivor calculation strategy
HelperCreationException - error creating the helper class

setCandidateFieldValue

public ObjectNode setCandidateFieldValue(ObjectNode eo,
                                         SystemField candidateField)
                                  throws SurvivorCalculationException,
                                         SystemObjectException
sets the candidate field on the omega object using the given value

Specified by:
setCandidateFieldValue in class AbstractSurvivorHelper
Parameters:
eo - entity object
candidateField - field name and value
Returns:
the Omega object with updated values return null if error setting candidate field value
Throws:
SurvivorCalculationException - unexpected values
SystemObjectException - error accessing entity object


Sun Microsystems, Inc.