javax.jdo.annotations

## Annotation Type Element

-     @Target(value={ANNOTATION_TYPE,FIELD,METHOD})
       @Retention(value=RUNTIME)
      public @interface Element

  Annotation for the element of a collection/array relation. Corresponds to the xml element "element".
  Since:
    2.1
  Version:
    2.1

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `column` Name of the column to store the element in.
    `Column[]` | `columns` The column(s) for the element.
    `Class<? extends AttributeConverter>` | `converter` Optional `AttributeConverter` to use for converting this element.
    `ForeignKeyAction` | `deleteAction` Delete action to apply to any foreign key for the element.
    `String` | `dependent` Whether the element is dependent on the owner, and will be deleted when the owner is deleted.
    `String` | `embedded` Whether this element is embedded.
    `Embedded[]` | `embeddedMapping` The embedded mapping for the element.
    `Extension[]` | `extensions` Vendor extensions.
    `String` | `foreignKey` Name for a generated foreign key constraint.
    `String` | `generateForeignKey` Generate or assume a foreign key constraint exists on the column or columns associated with this join.
    `String` | `index` The name of the index to generate.
    `String` | `indexed` Whether the value column(s) should be indexed.
    `String` | `mappedBy` Name of the member in the target class that forms a bidirectional relationship with this member.
    `String` | `serialized` Whether the element is to be stored serialized (into a join table)
    `String` | `table` Name of the table for the element.
    `Class[]` | `types` Types of the elements.
    `String` | `unique` Whether a unique constraint should be generated or assumed.
    `String` | `uniqueKey` The name of the unique key constraint to generate.
    `ForeignKeyAction` | `updateAction` Update action to apply to any foreign key for the element
    `boolean` | `useDefaultConversion` Whether we should disable any converter that was specified as default for this type on the PMF.

- - ### Element Detail

    - #### types

          public abstract Class[] types

      Types of the elements. This can be determined if using JDK1.5 generics but is required otherwise. Multiple types can be specified if the implementation supports multiple types.
      Returns:
        the types of elements
      Default:
        {}

  - - #### serialized

          public abstract String serialized

      Whether the element is to be stored serialized (into a join table)
      Returns:
        whether the element is to be stored serialized (into a join table)
      Default:
        ""

  - - #### embedded

          public abstract String embedded

      Whether this element is embedded.
      Returns:
        whether this element is embedded
      Default:
        ""

  - - #### embeddedMapping

          public abstract Embedded[] embeddedMapping

      The embedded mapping for the element.
      Returns:
        the embedded mapping for the element
      Default:
        {}

  - - #### dependent

          public abstract String dependent

      Whether the element is dependent on the owner, and will be deleted when the owner is deleted.
      Returns:
        whether the element is dependent on the owner, and will be deleted when the owner is deleted
      Default:
        ""

  - - #### table

          public abstract String table

      Name of the table for the element.
      Returns:
        name of the table for the element
      Default:
        ""

  - - #### column

          public abstract String column

      Name of the column to store the element in.
      Returns:
        name of the column to store the element in
      Default:
        ""

  - - #### deleteAction

          public abstract ForeignKeyAction deleteAction

      Delete action to apply to any foreign key for the element.
      Returns:
        delete action to apply to any foreign key for the element
      Default:
        javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED

  - - #### updateAction

          public abstract ForeignKeyAction updateAction

      Update action to apply to any foreign key for the element
      Returns:
        update action to apply to any foreign key for the element
      Default:
        javax.jdo.annotations.ForeignKeyAction.UNSPECIFIED

  - - #### indexed

          public abstract String indexed

      Whether the value column(s) should be indexed.
      Returns:
        whether the value column(s) should be indexed.
      Default:
        ""

  - - #### index

          public abstract String index

      The name of the index to generate.
      Returns:
        the name of the index
      Default:
        ""

  - - #### unique

          public abstract String unique

      Whether a unique constraint should be generated or assumed.
      Returns:
        whether a unique constraint should be generated or assumed
      Default:
        ""

  - - #### uniqueKey

          public abstract String uniqueKey

      The name of the unique key constraint to generate.
      Returns:
        the name of the unique key constraint
      Default:
        ""

  - - #### mappedBy

          public abstract String mappedBy

      Name of the member in the target class that forms a bidirectional relationship with this member.
      Returns:
        name of the member in the target class that forms a bidirectional relationship with this member
      Default:
        ""

  - - #### columns

          public abstract Column[] columns

      The column(s) for the element.
      Returns:
        the column(s) for the element
      Default:
        {}

  - - #### generateForeignKey

          public abstract String generateForeignKey

      Generate or assume a foreign key constraint exists on the column or columns associated with this join. Specify "true" or "false".
      Returns:
        whether to generate or assume a primary key constraint
      Default:
        ""

  - - #### foreignKey

          public abstract String foreignKey

      Name for a generated foreign key constraint.
      Returns:
        the name of the generated foreign key constraint
      Default:
        ""

  - - #### converter

          public abstract Class<? extends AttributeConverter> converter

      Optional `AttributeConverter` to use for converting this element.
      Returns:
        The converter class (or NullAttributeConverter if not specified).
      Default:
        javax.jdo.AttributeConverter.UseDefault.class

  - - #### useDefaultConversion

          public abstract boolean useDefaultConversion

      Whether we should disable any converter that was specified as default for this type on the PMF. Only has any effect when this is explicitly set to true, when any AttributeConverter specified for this type either here or for the class or at the PMF will be ignored and will use the JDO implementation default handling.
      Returns:
        Whether PMF attribute conversion is to be disabled.
      Default:
        false

  - - #### extensions

          public abstract Extension[] extensions

      Vendor extensions.
      Returns:
        the vendor extensions
      Default:
        {}

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.