Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.eindex.survivor
Interface SurvivorStrategyInterface

public interface SurvivorStrategyInterface

The SurvivorStrategyInterface class is the interface for all default and custom survivor calculators. This class must be implemented by any custom calculators plugged in to a master index application.

Method Summary
`java.lang.Object` | `clone()` Returns an exact copy of the survivor strategy object.
`void` | `init(java.util.Collection parameters)` Initializes the survivor strategy object.
`SystemField` | `selectField(java.lang.String candidateId, SystemFieldListMap fields)` Selects the field value to populate into the Single Best Record (SBR).

Method Detail

### clone

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

  Returns an exact copy of the survivor strategy object. This method must be implemented by all sub-classes, and is required for the prototype pattern.

  Parameters:
    None.

  Returns:
    `Object` - A copy of the object.
  Throws:
    `java.lang.CloneNotSupportedException` - Thrown if the strategy does not support cloning.

### init

    public void init(java.util.Collection parameters)
              throws StrategyCreationException

  Initializes the survivor strategy object. Call this method after creating the object.

  Parameters:
    `parameters` - The parameters given in the Best Record configuration file.
  Returns:
    `void` - None.
  Throws:
    `StrategyCreationException` - Thrown if the strategy cannot be initialized.

### selectField

    public SystemField selectField(java.lang.String candidateId,
                                   SystemFieldListMap fields)
                            throws SurvivorCalculationException

  Selects the field value to populate into the Single Best Record (SBR). The field value is contained within a SystemField object.

  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.

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2007 by Sun Microsystems, Inc. All Rights Reserved.