javax.jdo.annotations

## Annotation Type Convert

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

  Specifies that a given type should be converted before being stored to, and after being retrieved from the datastore using the given `AttributeConverter`. If this annotation is placed on a type, then the conversion applies to all fields or properties whose types match the entity type of the given `AttributeConverter`. Any `Convert` annotations placed on members overrides any type-level conversion specifications. If this annotation is placed on a field or property, the annotated attribute's type must be assignment-compatible with the `AttributeConverter`'s entity type argument.
  Since:
    3.2
  Version:
    3.2

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `Class<? extends AttributeConverter>` | `value` The `AttributeConverter` to use for conversion.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `boolean` | `enabled` Whether this conversion is enabled.

- - ### Element Detail

    - #### value

          public abstract Class<? extends AttributeConverter> value

      The `AttributeConverter` to use for conversion.
      Returns:
        Converter class to use

  - - #### enabled

          public abstract boolean enabled

      Whether this conversion is enabled. True by default. Setting this to false allows disabling conversion that was specified at PMF level.
      Returns:
        Whether the PMF default converter is enabled
      Default:
        true

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