Enum Integrity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Integrity>

    public enum Integrity
    extends java.lang.Enum<Integrity>
    The referential integrity mode.
    Author:
    harald
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COMPOSITE
      application-level and composite relations.
      COMPOSITE_DBONLY
      same as COMPOSITE but no check on application level.
      FULL
      application-level and all related and composite relations.
      FULL_DBONLY
      same as FULL but no check on application level.
      NONE
      no integrity checks at all.
      RELATED
      application-level and foreign keys for non-composite relations.
      RELATED_DBONLY
      same as RELATED but no check on application level.
      SOFT
      application-level integrity checks only.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isCheckedByApplication()
      Returns whether integrity is checked on the application level.
      boolean isCompositesCheckedByDatabase()
      Returns whether integrity is checked by the database for composite entities.
      boolean isRelatedCheckedByDatabase()
      Returns whether integrity is checked by the database for related entities.
      static Integrity valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Integrity[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NONE

        public static final Integrity NONE
        no integrity checks at all.
      • SOFT

        public static final Integrity SOFT
        application-level integrity checks only.
      • RELATED

        public static final Integrity RELATED
        application-level and foreign keys for non-composite relations.
      • COMPOSITE

        public static final Integrity COMPOSITE
        application-level and composite relations.
      • RELATED_DBONLY

        public static final Integrity RELATED_DBONLY
        same as RELATED but no check on application level.
      • COMPOSITE_DBONLY

        public static final Integrity COMPOSITE_DBONLY
        same as COMPOSITE but no check on application level.
      • FULL_DBONLY

        public static final Integrity FULL_DBONLY
        same as FULL but no check on application level.
      • FULL

        public static final Integrity FULL
        application-level and all related and composite relations.
    • Method Detail

      • values

        public static Integrity[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Integrity c : Integrity.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Integrity valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • isCheckedByApplication

        public boolean isCheckedByApplication()
        Returns whether integrity is checked on the application level.
        Returns:
        true if integrity is checked on the application level
      • isRelatedCheckedByDatabase

        public boolean isRelatedCheckedByDatabase()
        Returns whether integrity is checked by the database for related entities.
        Returns:
        true if integrity is checked by the database
      • isCompositesCheckedByDatabase

        public boolean isCompositesCheckedByDatabase()
        Returns whether integrity is checked by the database for composite entities.
        Returns:
        true if integrity is checked by the database