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

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

public class DefaultSurvivorStrategy
extends java.lang.Object
implements SurvivorStrategyInterface, java.lang.Cloneable, java.io.Serializable

Default survivor strategy class. Selects the field from the system specified in the initialization parameter

See Also:
Serialized Form

Constructor Summary
DefaultSurvivorStrategy()
          Creates new MySurvivalStrategy
 
Method Summary
 java.lang.Object clone()
          
 void init(java.util.Collection parameters)
           
 SystemField selectField(java.lang.String candidateId, SystemFieldListMap fields)
          Selects the field from the system specified in the initialization parameter
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSurvivorStrategy

public DefaultSurvivorStrategy()
Creates new MySurvivalStrategy

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException

Specified by:
clone in interface SurvivorStrategyInterface
Returns:
clone of the object
Throws:
java.lang.CloneNotSupportedException - cloning is not supported

init

public void init(java.util.Collection parameters)
          throws StrategyCreationException
Description copied from interface: SurvivorStrategyInterface
Initializes the survivor strategy object. Call this method after creating the object.

Specified by:
init in interface SurvivorStrategyInterface
Parameters:
parameters - The parameters given in the Best Record configuration file.
Returns:
void - None.
Throws:
StrategyCreationException - Thrown if the strategy cannot be initialized.
See Also:
SurvivorStrategyInterface.selectField(java.lang.String, com.sun.mdm.index.survivor.SystemFieldListMap)

selectField

public SystemField selectField(java.lang.String candidateId,
                               SystemFieldListMap fields)
                        throws SurvivorCalculationException
Selects the field from the system specified in the initialization parameter

Specified by:
selectField in interface SurvivorStrategyInterface
Parameters:
candidateId - The candidate field name.
fields - The mapping of a system fields list to a system key.
Returns:
SystemField - The value of the field that has been selected to populate the SBR. This method returns null if the new value cannot be determined and the original candidate value should be used.
Throws:
SurvivorCalculationException - Thrown if there is an error with the calculation configuration.
See Also:
SurvivorStrategyInterface.selectField(java.lang.String, com.sun.mdm.index.survivor.SystemFieldListMap)


Sun Microsystems, Inc.