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 component relations.
    boolean
    Returns whether this is the relation to an embedded entity.
    The columns of an embedded entity live in the owner's table.
    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 component relations. It is false for all non-component relations.
      Returns:
      true if this is a component, false if a non-component 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 component's parent.
      Default:
      false
    • embedded

      boolean embedded
      Returns whether this is the relation to an embedded entity.
      The columns of an embedded entity live in the owner's table.
      Returns:
      true if this is an embedded entity
      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