DeleteRuleUpdater (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.util, class: DeleteRuleUpdater

# Class DeleteRuleUpdater

java.lang.Object
org.apache.cayenne.util.DeleteRuleUpdater

All Implemented Interfaces:
  `EntityMergeListener`

public class DeleteRuleUpdater extends Object implements EntityMergeListener
DeleteRuleUpdater is responsible for auto-setting delete rules for object relationships

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DeleteRuleUpdater()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static EntityMergeListener`
  `getEntityMergeListener()`
  Returns EntityMergeListener instance, which can set delete rule at relationship change
  `void`
  `objAttributeAdded(ObjAttribute attr)`
  Invoked when a missing attribute in ObjEntity is completed from DbEntity
  `void`
  `objRelationshipAdded(ObjRelationship rel)`
  Invoked when a missing relationship in ObjEntity is completed from DbEntity
  `static void`
  `updateDataMap(DataMap map)`
  Updates delete rules for all obj entities in a datamap
  `static void`
  `updateObjEntity(ObjEntity e)`
  Updates delete rules for all relationships in a objentity
  `static void`
  `updateObjRelationship(ObjRelationship rel)`
  Updates delete rules for specified relationship

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DeleteRuleUpdater

    public DeleteRuleUpdater()

- ## Method Details

  - ### updateDataMap

    public static void updateDataMap(DataMap map)
    Updates delete rules for all obj entities in a datamap

  - ### updateObjEntity

    public static void updateObjEntity(ObjEntity e)
    Updates delete rules for all relationships in a objentity

  - ### updateObjRelationship

    public static void updateObjRelationship(ObjRelationship rel)
    Updates delete rules for specified relationship

  - ### objAttributeAdded

    public void objAttributeAdded(ObjAttribute attr)
    Description copied from interface: `EntityMergeListener`
    Invoked when a missing attribute in ObjEntity is completed from DbEntity
    Specified by:
      `objAttributeAdded` in interface `EntityMergeListener`

  - ### objRelationshipAdded

    public void objRelationshipAdded(ObjRelationship rel)
    Description copied from interface: `EntityMergeListener`
    Invoked when a missing relationship in ObjEntity is completed from DbEntity
    Specified by:
      `objRelationshipAdded` in interface `EntityMergeListener`

  - ### getEntityMergeListener

    public static EntityMergeListener getEntityMergeListener()
    Returns EntityMergeListener instance, which can set delete rule at relationship change