Enum Class UniquePropertyQuality

java.lang.Object
java.lang.Enum<UniquePropertyQuality>
org.fastnate.generator.context.UniquePropertyQuality
All Implemented Interfaces:
Serializable, Comparable<UniquePropertyQuality>, Constable

public enum UniquePropertyQuality extends Enum<UniquePropertyQuality>
  • Enum Constant Details

    • onlyRequiredPrimitives

      public static final UniquePropertyQuality onlyRequiredPrimitives
      Only required primitives are allowed.
    • onlyRequired

      public static final UniquePropertyQuality onlyRequired
      Only required primitives and required entity references and are allowed.
    • onlyPrimitives

      public static final UniquePropertyQuality onlyPrimitives
      Only primitives are allowed (even optional).
    • all

      public static final UniquePropertyQuality all
      All primitives or entity references are allowed.
  • Method Details

    • values

      public static UniquePropertyQuality[] values()
      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 UniquePropertyQuality valueOf(String name)
      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
    • getMatchingQuality

      public static UniquePropertyQuality getMatchingQuality(Property<?,?> property)
      Finds the best quality that matches the given property.
      Parameters:
      property - the property to check
      Returns:
      the quality with the lowest ordinal, that matches the given property, or null if the property is never allowed
    • isAllowed

      public abstract boolean isAllowed(Property<?,?> property)
      Indicates which type of property is allowed for this quality.
      Parameters:
      property - the property to check
      Returns:
      true if that property is allowed as unique property