Interface AttributeOptions

All Superinterfaces:
CommonOptions
All Known Implementing Classes:
AttributeOptionsImpl

public interface AttributeOptions extends CommonOptions
Options for attributes.
Author:
harald
  • Method Details

    • getAttribute

      Attribute getAttribute()
      Gets the attribute this option-set belongs to.
      Returns:
      the entity
    • getAnnotations

      List<String> getAnnotations()
      Gets the list of annotations.
      Annotations start with an @. By default, they are applied to the getters of the interfaces only. However, the at-sign may be followed by one or two modifiers that changes the code generation:
      • =: annotate setter only.
      • +: annotate setter and getter.
      • ~: annotation is hidden, i.e. applied to the implementations instead of the interfaces.
      Example:
         @=~MyAnno
         will be applied to the implementation of the setter only.
       
      Returns:
      the annotations
    • getDefaultValue

      Object getDefaultValue()
      Gets the default value if [DEFAULT value] given.
      The returned type corresponds to the DataType of the Attribute.
      Returns:
      the defaultValue
    • getInitialValue

      String getInitialValue()
      Gets the initial value if [INIT value] given.
      Returns:
      the string to initialize the declaration with
    • isContextId

      boolean isContextId()
      Returns whether this is the object id holding the context.
      Returns:
      true if context id
    • isDomainKey

      boolean isDomainKey()
      Returns whether this is a unique domain key (or part of it).
      Returns:
      true if domain key
    • isUTC

      boolean isUTC()
      Returns whether this is a UTC timestamp.
      Returns:
      true if UTC
    • isWithTimezone

      boolean isWithTimezone()
      Returns whether to use a dedicated timezone.
      If set, the PDO must provide a method to configure the timezone for the given attribute of the form:
       Calendar get<attribute-name>TimezoneConfig();
      
       Example: Calendar getPrintedTimezoneConfig();
       
      Returns:
      true if with timezone
    • isUnsigned

      boolean isUnsigned()
      Returns whether this is an unsigned numeric field.
      Returns:
      true if unsigned
    • isDigitsOnly

      boolean isDigitsOnly()
      Returns whether only digits are allowed as input.
      Applies only to strings. Number types provide their own rules.
      Returns:
      true if allow only digits
    • isHidden

      boolean isHidden()
      Returns whether the attribute is not declared in the interface.
      Returns:
      true if implemented only, no public interface definition
    • isShallow

      boolean isShallow()
      Returns whether the attribute should be skipped in snapshot and copy operations.
      Returns:
      true if skip this attribute, false to include (default)
    • isPartOfNormText

      boolean isPartOfNormText()
      Returns whether the attribute becomes part of the normtext.
      Returns:
      true if add to normtext