UnboundID LDAP SDK for Java

Ping Identity
Product Information
Using the LDAP SDK Persistence Framework

The @LDAPGetter and @LDAPSetter Annotation Types

The @LDAPGetter annotation type may be used to mark a method that will be invoked in the course of encoding a Java object to an LDAP entry. The method should not take any arguments, and should return a value (or set of values) that will be converted to an attribute to include in the generated entry. The @LDAPSetter annotation type may be used to mark a method that will be invoked in the course of initializing a Java object from an LDAP entry. The method should take exactly one argument, which will be a value (or set of values) decoded from an LDAP attribute.

In simple cases, the @LDAPGetter and @LDAPSetter annotation types provide roughly the same functionality as the @LDAPField annotation type, but they can be used to provide additional functionality. In particular, using the method annotations rather than field annotations make it possible to provide more complex processing when encoding or decoding attribute values (e.g., breaking up a single attribute value across multiple fields), or to have values which are read-only or write-only.

The methods marked with @LDAPGetter or @LDAPSetter must not be declared static, but they may have any visibility modifier, including public, private, protected, or the default package-level access.

Elements that may be included in the @LDAPGetter annotation type include:

Elements that may be included in the @LDAPSetter annotation type include: