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 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