Enum MergePolicy

  • All Implemented Interfaces:
    Serializable, Comparable<MergePolicy>

    public enum MergePolicy
    extends Enum<MergePolicy>
    The policy to apply when trying to import an object with same identifier as an existing object.
    This is the view of the different policies of merge available to the application, for the business logic, see Merger (and its implementations in Mergers).
    • Enum Constant Detail

      • IGNORE

        public static final MergePolicy IGNORE
        Ignore the objects that already exist
      • FAIL

        public static final MergePolicy FAIL
        Fail when an object try to be imported but already exist
    • Method Detail

      • values

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

        public static MergePolicy 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
      • getId

        public String getId()
        Gets the id
        Returns:
        the id