com.unboundid.ldap.sdk.persist
Annotation Type LDAPObject


@Documented
@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface LDAPObject

This annotation type may be used to mark classes for objects that may be persisted in an LDAP directory server. It may only be used to mark classes, and should not be used for interfaces or annotation types. Classes with this annotation type must provide a default zero-argument constructor. Fields in the associated class which are to be persisted should be marked with the LDAPField annotation type.


Optional Element Summary
 java.lang.String[] auxiliaryClass
          The name(s) of any auxiliary object class(es) for LDAP entries created from the associated object type.
 java.lang.String defaultParentDN
          The DN of the entry below which objects of this type will be created if no alternate parent DN is specified.
 java.lang.String postDecodeMethod
          The name of a method that should be invoked on an object after all other decode processing has been performed for that object.
 java.lang.String postEncodeMethod
          The name of a method that should be invoked after an object has been encoded to an LDAP entry.
 boolean requestAllAttributes
          Indicates whether to request all attributes when performing searches to retrieve objects of this type.
 java.lang.String structuralClass
          The name of the structural object class for LDAP entries created from the associated object type.
 java.lang.String[] superiorClass
          The name(s) of any superior object class(es) for the structural and/or auxiliary object classes that should be included in generated entries.
 

requestAllAttributes

public abstract boolean requestAllAttributes
Indicates whether to request all attributes when performing searches to retrieve objects of this type. If this is true, then the search request will attempt to retrieve all user and operational attributes. If this is false, then the search request will attempt to retrieve only those attributes which are referenced by an LDAPField or LDAPSetter annotation. Note that if this is given a value of true, then lazy loading will be disabled.

Default:
false

defaultParentDN

public abstract java.lang.String defaultParentDN
The DN of the entry below which objects of this type will be created if no alternate parent DN is specified. A value equal to the empty string indicates that there should be no default parent DN.

If a class marked with the LDAPObject annotation type does not specify a default parent DN but is a direct subclass of another class marked with LDAPObject, then the subclass will inherit the default parent DN from the superclass.

Default:
""

postDecodeMethod

public abstract java.lang.String postDecodeMethod
The name of a method that should be invoked on an object after all other decode processing has been performed for that object. It may perform any additional work or validation that is not available as part of the LDAP SDK persistence framework. If a method name is provided, then that method must exist in the associated class and it must not take any arguments. It may throw any kind of exception if the object is not valid.

Default:
""

postEncodeMethod

public abstract java.lang.String postEncodeMethod
The name of a method that should be invoked after an object has been encoded to an LDAP entry. It may alter the generated entry in any way, including adding, removing, or replacing attributes, or altering the entry DN. If a method name is provided, then that method must exist in the associated class and it must take exactly one argument, with a type of Entry. It may throw any kind of exception if a problem is found with the entry and it should not be used.

Default:
""

structuralClass

public abstract java.lang.String structuralClass
The name of the structural object class for LDAP entries created from the associated object type. If no value is provided, then it will be assumed that the object class name is equal to the unqualified name of the Java class.

Default:
""

auxiliaryClass

public abstract java.lang.String[] auxiliaryClass
The name(s) of any auxiliary object class(es) for LDAP entries created from the associated object type.

Default:
{}

superiorClass

public abstract java.lang.String[] superiorClass
The name(s) of any superior object class(es) for the structural and/or auxiliary object classes that should be included in generated entries.

Default:
{}