Class ForeignKeyAction

  • All Implemented Interfaces:

    public class ForeignKeyAction
    extends Object
    implements Serializable
    Foreign keys represent a consistency constraint in the database that must be maintained. This class enumerates the actions which happens when foreign-keys are updated or deleted.
    See Also:
    Serialized Form
    • Field Detail

      • CASCADE

        public static final ForeignKeyAction CASCADE
        update/delete-action="cascade". The database will automatically delete all rows that refer to the row being deleted
      • RESTRICT

        public static final ForeignKeyAction RESTRICT
        update/delete-action="restrict". The user is required to explicitly make the relationship valid by application code
      • NULL

        public static final ForeignKeyAction NULL
        update/delete-action="null". The database will automatically nullify the columns in all rows that refer to the row being deleted
      • DEFAULT

        public static final ForeignKeyAction DEFAULT
        update/delete-action="default". The database will automatically set the columns in all rows that refer to the row being deleted to their default value
      • NONE

        public static final ForeignKeyAction NONE
        update/delete-action="none". No foreign-key should be created.
    • Constructor Detail

      • ForeignKeyAction

        protected ForeignKeyAction​(int i)
        i - type id
    • Method Detail

      • toString

        public String toString()
        Returns a string representation of the object.
        toString in class Object
        a string representation of the object.
      • hashCode

        public int hashCode()
        hashCode in class Object
      • getType

        protected int getType()
        Accessor for the type.
        The type
      • getForeignKeyAction

        public static ForeignKeyAction getForeignKeyAction​(String value)
        Return ForeignKeyDeleteAction from String.
        value - delete-action attribute value
        Instance of ForeignKeyDeleteAction. If value invalid, return null.