org.springframework.ldap.odm.annotations

## Annotation Type Attribute

-     @Target(value=FIELD)
       @Retention(value=RUNTIME)
      public @interface Attribute

  This annotation describes the mapping of a Java field to an LDAP attribute.

  The containing class must be annotated with `Entry`.

  Author:
    Paul Harvey <paul.at.pauls-place.me.uk>
  See Also:
    `Entry`

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `name` The LDAP attribute name that this field represents.
    `boolean` | `readonly` A boolean parameter to indicate if the attribute should be read only.
    `String` | `syntax` The LDAP syntax of the attribute that this field represents.
    `Attribute.Type` | `type` Indicates whether this field is returned by the LDAP JNDI provider as a `String` (`Type.STRING`) or as a `byte[]` (`Type.BINARY`).

- - ### Element Detail

    - #### name

          public abstract String name

      The LDAP attribute name that this field represents.

      Defaults to "" in which case the Java field name is used as the LDAP attribute name.

      Returns:
        The LDAP attribute name.
      Default:
        ""

  - - #### type

          public abstract Attribute.Type type

      Indicates whether this field is returned by the LDAP JNDI provider as a `String` (`Type.STRING`) or as a `byte[]` (`Type.BINARY`).
      Returns:
        Either `Type.STRING` to indicate a string attribute or `Type.BINARY` to indicate a binary attribute.
      Default:
        org.springframework.ldap.odm.annotations.Attribute.Type.STRING

  - - #### syntax

          public abstract String syntax

      The LDAP syntax of the attribute that this field represents.

      This optional value is typically used to affect the precision of conversion of values between LDAP and Java, see `ConverterManager` and `ConverterManagerImpl`.

      Returns:
        The LDAP syntax of this attribute.
      Default:
        ""

  - - #### readonly

          public abstract boolean readonly

      A boolean parameter to indicate if the attribute should be read only.

      This value allows attributes to be read on read, but not persisted, there are many operational and read-only ldap attributes which will throw errors if they are persisted back to ldap.

      Returns:
        `true` is the attribute should not be written to ldap.
      Default:
        false