Enum SequenceMismatchStrategy

    • Enum Constant Detail

      • LOG

        public static final SequenceMismatchStrategy LOG
        When detecting a mismatch, Hibernate simply logs the sequence whose entity mapping configuration conflicts with the one found in the database.
      • EXCEPTION

        public static final SequenceMismatchStrategy EXCEPTION
        When detecting a mismatch, Hibernate throws a MappingException indicating the sequence whose entity mapping configuration conflict with the one found in the database.
      • FIX

        public static final SequenceMismatchStrategy FIX
        When detecting a mismatch, Hibernate tries to fix it by overriding the entity sequence mapping using the one found in the database.
      • NONE

        public static final SequenceMismatchStrategy NONE
        Don't perform any check. This is useful to speedup bootstrap as it won't query the sequences on the DB, at cost of not validating the sequences.
    • Method Detail

      • values

        public static SequenceMismatchStrategy[] 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 (SequenceMismatchStrategy c : SequenceMismatchStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SequenceMismatchStrategy valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null