Annotation Interface GcPersistableClass


@Retention(RUNTIME) @Target(TYPE) public @interface GcPersistableClass
Metadata about class objects that can be stored to the database.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Whether the default behavior for fields in this class should be to persist or to not persist, default is to persist.
    boolean
    If should try to update, and if error then insert
    boolean
    There is no primary key for this object - saving through DbAccess always results in a new row.
    The name of the table that this object maps to in the database.
  • Element Details

    • tableName

      String tableName
      The name of the table that this object maps to in the database.
      Returns:
      the table name.
      Default:
      ""
    • defaultFieldPersist

      GcPersist defaultFieldPersist
      Whether the default behavior for fields in this class should be to persist or to not persist, default is to persist.
      Returns:
      true if so.
      Default:
      doPersist
    • hasNoPrimaryKey

      boolean hasNoPrimaryKey
      There is no primary key for this object - saving through DbAccess always results in a new row.
      Returns:
      true if so.
      Default:
      false
    • defaultUpdate

      boolean defaultUpdate
      If should try to update, and if error then insert
      Returns:
      true if so.
      Default:
      false