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.update
Interface UpdatePolicy

public interface UpdatePolicy

The UpdatePolicy class allows you to define custom logic that changes the content of an enterprise object before the object is persisted in the database during a transaction. This class must be implemented by any custom plug-ins that define custom update policies. Custom update policies are specified in the Best Record file of the master index. One example of how an update policy might be used is to create and store alias names for a person record each time a name is changed during a transaction. For more information about custom plug-ins, see the eView Studio User's Guide. For more information about update policies and the Best Record file, see the eView Studio Configuration Guide.

Method Summary
`EnterpriseObject` | `applyUpdatePolicy(EnterpriseObject beforeImage, EnterpriseObject afterImage)` Applies the custom update policy to an enterprise object following a transaction against that object.

Method Detail

### applyUpdatePolicy

    public EnterpriseObject applyUpdatePolicy(EnterpriseObject beforeImage,
                                              EnterpriseObject afterImage)
                                       throws SystemObjectException,
                                              ObjectException,
                                              UserException

  Applies the custom update policy to an enterprise object following a transaction against that object. This allows you to define custom logic to change the data contained in an enterprise object after it has been changed by an incoming transaction and before it is saved to the database.

  Parameters:
    `beforeImage` - An EnterpriseObject after a transaction occurs, but before the update logic is applied.
    `afterImage` - The EnterpriseObject after update logic is applied.
  Returns:
    EnterpriseObject The enterprise object to be persisted in the database.
  Throws:
    `SystemObjectException` - Thrown if there was an error accessing the system objects (class SystemObject) in the enterprise object.
    `ObjectException` - Thrown if there was an error accessing the object nodes (class ObjectNode).
    `UserException` - Thrown if there was an error in the parameters.

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.