Enum Class AccessStyle

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

public enum AccessStyle extends Enum<AccessStyle>
Indicates how persistent attributes are accessed.
Author:
Tobias Liefke
  • Enum Constant Details

  • Method Details

    • values

      public static AccessStyle[] 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 AccessStyle 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
    • getStyle

      public static AccessStyle getStyle(jakarta.persistence.AccessType type)
      Determines the correct mapping to the style for the given accesstype.
      Parameters:
      type - the access type as defined in an Access annotation.
      Returns:
      the matching style
    • getDeclaredAttributes

      public abstract <E> Iterable<AttributeAccessor> getDeclaredAttributes(Class<E> inspectedClass, Class<? extends E> implementationClass)
      Finds all attributes of the current access type that are referenced in the given class.
      Parameters:
      inspectedClass - the class to inspect
      implementationClass - the class that is actually the type of the object, either inspectedClass or a sub class - necessary for resolving generics
      Returns:
      all non static attributes found in the given class