Configuring Sun Master Indexes

Configuring Master Index Update Policies

When update.xml is generated, no Java classes are defined for the update policies. You can create custom update policy classes and specify that the custom classes be used instead. Custom update policies must implement com.sun.mdm.index.update.UpdatePolicy and must be defined as custom classes in the Sun Master Index project to be recognized as an update policy. The names of the custom plug-ins you create are the values you enter for the update policies. You can also set the update policy flag to specify whether the policies are performed when no changes are made to an existing record.

Perform the following tasks to configure the update policies:

Defining Master Index Update Policies

You can define update policies for any of the seven update policy elements. You do not need to specify a policy for each element.

ProcedureTo Define Update Policies

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click update.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the UpdateManagerConfig section of the file.

  3. Do any of the following:

    • To modify the merge policy for enterprise objects, change the value of the EnterpriseMergePolicy element to the fully qualified name of the new Java class.

      For example:


         <EnterpriseMergePolicy>com.sun.mdm.index.user.MyEntMergePolicy
         </EnterpriseMergePolicy>
    • To modify the unmerge policy for enterprise objects, change the value of the EnterpriseUnmergePolicy element to the fully qualified name of the new Java class.

      For example:


         <EnterpriseUnmergePolicy>com.sun.mdm.index.user.MyEntUnmergePolicy
         </EnterpriseUnmergePolicy>
    • To modify the update policy for enterprise objects, change the value of the EnterpriseUpdatePolicy element to the fully qualified name of the new Java class.

      For example:


         <EnterpriseUpdatePolicy>com.sun.mdm.index.user.MyEntUpdatePolicy
         </EnterpriseUpdatePolicy>
    • To modify the create policy for enterprise objects, change the value of the EnterpriseCreatePolicy element to the fully qualified name of the new Java class.

      For example:


         <EnterpriseCreatePolicy>com.sun.mdm.index.user.MyCreatePolicy
         </EnterpriseCreatePolicy>
    • To modify the merge policy for system objects, change the value of the SystemMergePolicy element to the fully qualified name of the new merge policy Java class.

      For example:


         <SystemMergePolicy>com.sun.mdm.index.user.MySysMergePolicy
         </SystemMergePolicy>
    • To modify the unmerge policy for system objects, change the value of the SystemUnmergePolicy element to the fully qualified name of the new Java class.

      For example:


         <SystemUnmergePolicy>com.sun.mdm.index.user.MySysUnmergePolicy
         </SystemUnmergePolicy>
    • To modify the assumed match policy, change the value of the UndoAssumeMatchPolicy element to the fully qualified name of the new Java class.

      For example:


      <UndoAssumeMatchPolicy>com.sun.mdm.index.user.MyUndoAsmMatchPolicy
         </UndoAssumeMatchPolicy>
  4. Save and close the file.

Setting the Master Index Update Policy Flag

The update flag determines whether update policies are performed against a record when a transaction does not cause any changes to the record’s data.

ProcedureTo Set the Update Policy Flag

  1. In the Projects window, expand the Configuration node in the project you want to modify, and then double-click update.xml.

    The file opens in the NetBeans XML editor.

  2. Scroll to the UpdateManagerConfig section of the file.

  3. To specify that update policies are not performed when no updates are made, set the SkipUpdateIfNoChange element to true.

    For example:


    <SkipUpdateIfNoChange>true</SkipUpdateIfNoChange>
  4. To specify that update policies are performed even though no updates are made, set the SkipUpdateIfNoChange element to false.

    For example:


    <SkipUpdateIfNoChange>false</SkipUpdateIfNoChange>
  5. Save and close the file.