Annotation Interface Persistent


@Documented @Retention(RUNTIME) @Target({FIELD,METHOD,TYPE}) public @interface Persistent
Persistent fields and methods are annotated with this annotation.

Allows examining the model by reflection from within the persistence layer.

Author:
harald
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional comment.
    boolean
    Returns whether this is a component of the PDO.
    This is true for all members/attributes and composite relations.
    int
    Gets the ordinal according to the model.
    Used to order the attributes and relations when analyzed via reflection.
    boolean
    Returns whether this is the relation to the parent PDO.
    The parent PDO provides a composite relation to this PDO.
  • Element Details

    • comment

      String comment
      Optional comment.
      Returns:
      the comment
      Default:
      ""
    • component

      boolean component
      Returns whether this is a component of the PDO.
      This is true for all members/attributes and composite relations. It is false for all non-composite relations.
      Returns:
      true if this is a component, false if a non-composite relation
      Default:
      true
    • parent

      boolean parent
      Returns whether this is the relation to the parent PDO.
      The parent PDO provides a composite relation to this PDO.
      Returns:
      true if this is a component and the annotated relation points to the composite parent.
      Default:
      false
    • ordinal

      int ordinal
      Gets the ordinal according to the model.
      Used to order the attributes and relations when analyzed via reflection.
      Returns:
      the ordinal, 0 if no ordinal available
      Default:
      0