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

## org.objectstyle.cayenne.map
Class DeleteRule

    java.lang.Object
      org.objectstyle.cayenne.map.DeleteRule

    public class DeleteRule

extends java.lang.Object

Defines constants for the possible values of ObjRelationship delete rules.

Author:
  Craig Miskell

Field Summary
`static int` | `CASCADE` Delete the destination object(s)
`static int` | `DENY` If the relationship has any objects (toOne or toMany), deny the delete.
`static int` | `NO_ACTION`
`static int` | `NULLIFY` Remove the reference that the destination has to this source (if the inverse relationship is toOne, nullify, if toMany, remove the source object)

Constructor Summary
`DeleteRule()`

Method Summary
`static int` | `deleteRuleForName(java.lang.String name)` Translates a possible delete rule name (typically returned from deleteRuleName at some stage), into a deleteRule constant
`static java.lang.String` | `deleteRuleName(int deleteRule)` Returns String label for a delete rule state.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NO_ACTION

    public static final int NO_ACTION

See Also:
  Constant Field Values

### NULLIFY

    public static final int NULLIFY

  Remove the reference that the destination has to this source (if the inverse relationship is toOne, nullify, if toMany, remove the source object)

  See Also:
    Constant Field Values

### CASCADE

    public static final int CASCADE

  Delete the destination object(s)

  See Also:
    Constant Field Values

### DENY

    public static final int DENY

  If the relationship has any objects (toOne or toMany), deny the delete. (Destination objects would therefore have to be deleted manually first)

  See Also:
    Constant Field Values

Constructor Detail

### DeleteRule

    public DeleteRule()

Method Detail

### deleteRuleName

    public static java.lang.String deleteRuleName(int deleteRule)

  Returns String label for a delete rule state. Used for save/load (xml), display in modeler etc. Must remain the same, or else great care taken with loading old maps.

### deleteRuleForName

    public static int deleteRuleForName(java.lang.String name)

  Translates a possible delete rule name (typically returned from deleteRuleName at some stage), into a deleteRule constant

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

Copyright © 2001-2006 ObjectStyle.org All Rights Reserved.