javax.jdo.annotations

## Annotation Type PersistenceCapable

-     @Target(value=TYPE)
       @Retention(value=RUNTIME)
      public @interface PersistenceCapable

  Annotation for whether the class or interface is persistence-capable.
  Since:
    2.1
  Version:
    2.1

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `cacheable` Whether this class is cacheable in a Level2 cache.
    `String` | `catalog` Catalog to use for persisting this class or interface.
    `String` | `detachable` Whether this class or interface is detachable.
    `String` | `embeddedOnly` Whether objects of this class or interface can only be embedded.
    `Extension[]` | `extensions` Any vendor extensions.
    `IdentityType` | `identityType` Type of identity for this class or interface.
    `Persistent[]` | `members` Member declarations.
    `Class` | `objectIdClass` Primary key class when using application identity and using own PK.
    `String` | `requiresExtent` Whether this class or interface manages an extent.
    `String` | `schema` Schema to use for persisting this class or interface.
    `String` | `serializeRead` Whether objects of this type should, by default, be locked when read.
    `String` | `table` Table to use for persisting this class or interface.

- - ### Element Detail

    - #### members

          public abstract Persistent[] members

      Member declarations. Annotations for persistent members of this class or interface can be specifed either here or on each member. Annotations for inherited members can only be specified here.
      Returns:
        member declarations
      Default:
        {}

  - - #### table

          public abstract String table

      Table to use for persisting this class or interface.
      Returns:
        The table
      Default:
        ""

  - - #### catalog

          public abstract String catalog

      Catalog to use for persisting this class or interface.
      Returns:
        The catalog
      Default:
        ""

  - - #### schema

          public abstract String schema

      Schema to use for persisting this class or interface.
      Returns:
        The schema
      Default:
        ""

  - - #### requiresExtent

          public abstract String requiresExtent

      Whether this class or interface manages an extent.
      Returns:
        Whether an extent is required
      Default:
        ""

  - - #### embeddedOnly

          public abstract String embeddedOnly

      Whether objects of this class or interface can only be embedded.
      Returns:
        Whether this is embedded only
      Default:
        ""

  - - #### detachable

          public abstract String detachable

      Whether this class or interface is detachable.
      Returns:
        Whether this is detachable
      Default:
        ""

  - - #### identityType

          public abstract IdentityType identityType

      Type of identity for this class or interface.
      Returns:
        The identity type for this class
      Default:
        javax.jdo.annotations.IdentityType.UNSPECIFIED

  - - #### objectIdClass

          public abstract Class objectIdClass

      Primary key class when using application identity and using own PK.
      Returns:
        Object-id class (if specified)
      Default:
        void.class

  - - #### cacheable

          public abstract String cacheable

      Whether this class is cacheable in a Level2 cache.
      Returns:
        Whether the class is L2 cacheable
      Since:
        2.2
      Default:
        "true"

  - - #### serializeRead

          public abstract String serializeRead

      Whether objects of this type should, by default, be locked when read.
      Returns:
        Whether we should lock this type of object by default
      Since:
        3.0
      Default:
        "false"

  - - #### extensions

          public abstract Extension[] extensions

      Any vendor extensions.
      Returns:
        The extensions defined for this class
      Default:
        {}

Copyright © 2005–1970 Apache Software Foundation. All rights reserved.