Module eclipselink

Annotation Interface Array


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface Array
Array types are extended object-relational data-types supported by some databases. Array types are user define types in the database such as VARRAY types on Oracle. Arrays can contain basic types (VARCHAR) or other Struct types, and can be stored in a column or in a Struct type.

This annotation can be defined on a collection attribute that is persisted to an Array type. The collection can be of basic types, or embeddable class mapped using a Struct.

See Also:
Author:
James Sutherland
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The database name of the database array structure type.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The basic or embeddable class that is the element type of the collection.
  • Element Details

    • targetClass

      Class<?> targetClass
      The basic or embeddable class that is the element type of the collection.

      This element is optional only if the collection field or property is defined using Java generics, and must be specified otherwise.

      It defaults to the parameterized type of the collection when defined using generics.

      Default:
      void.class
    • databaseType

      String databaseType
      The database name of the database array structure type.