Enum Class CascadeType

java.lang.Object
java.lang.Enum<CascadeType>
org.hibernate.annotations.CascadeType
All Implemented Interfaces:
Serializable, Comparable<CascadeType>, Constable

@Deprecated(since="7", forRemoval=true) public enum CascadeType extends Enum<CascadeType>
Deprecated, for removal: This API element is subject to removal in a future version.
Use the JPA-defined CascadeType. This enumeration will be removed to alleviate the duplication in naming.
Enumerates the persistence operations which may be cascaded from one entity instance to associated entity instances.

This enumeration of cascade types competes with the JPA-defined enumeration CascadeType, but offers additional options, including LOCK.

To enable cascade LOCK, use @Cascade, for example:

 @OneToMany(mappedBy="parent")
 @Cascade({PERSIST,REFRESH,REMOVE,LOCK})
 Set<Child> children;
 
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Includes all types listed here.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Ancient versions of Hibernate treated orphan removal as a specialized type of cascade.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Equivalent to CascadeType.DETACH.
    Deprecated, for removal: This API element is subject to removal in a future version.
    A cascade type for the lock() operation.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Equivalent to CascadeType.MERGE.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Equivalent to CascadeType.PERSIST.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Equivalent to CascadeType.REFRESH.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Equivalent to CascadeType.REMOVE.
    Deprecated.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the enum constant of this class with the specified name.
    static CascadeType[]
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • values

      public static CascadeType[] values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CascadeType valueOf(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null