Package com.unboundid.ldap.sdk.persist
Annotation Type LDAPObject
-
@Documented @Retention(RUNTIME) @Target(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 theLDAPField
annotation type.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]
auxiliaryClass
The name) of any auxiliary object classes 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 names of any superior object classes for the structural and auxiliary object classes that should be included in generated entries.
-
-
-
Element Detail
-
requestAllAttributes
boolean requestAllAttributes
Indicates whether to request all attributes when performing searches to retrieve objects of this type. If this istrue
, then the search request will attempt to retrieve all user and operational attributes. If this isfalse
, then the search request will attempt to retrieve only those attributes which are referenced by anLDAPField
orLDAPSetter
annotation. Note that if this is given a value oftrue
, then lazy loading will be disabled.- Returns:
true
if all attributes should be requested, orfalse
if only referenced attributes should be requested.
- Default:
- false
-
-
-
defaultParentDN
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 theLDAPObject
annotation type does not specify a default parent DN but is a direct subclass of another class marked withLDAPObject
, then the subclass will inherit the default parent DN from the superclass.- Returns:
- The DN of the entry below which objects of this type will be created if no alternate parent DN is specified, or the empty string if there should be no default parent DN.
- Default:
- ""
-
-
-
postDecodeMethod
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.- Returns:
- The name of a method that should be invoked on an object after all other decode processing has been performed for that object, or an empty string if no post-decode method has been defined.
- Default:
- ""
-
-
-
postEncodeMethod
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 ofEntry
. It may throw any kind of exception if a problem is found with the entry and it should not be used.- Returns:
- The name of a method that should be invoked after an object has been encoded to an LDAP entry, or an empty string if no post-encode method has been defined.
- Default:
- ""
-
-
-
structuralClass
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.- Returns:
- The name of the structural object class for LDAP entries created from the associated object type, or an empty string if the object class name will be assumed to be equal to the unqualified name of the Java class.
- Default:
- ""
-
-
-
auxiliaryClass
java.lang.String[] auxiliaryClass
The name) of any auxiliary object classes for LDAP entries created from the associated object type.- Returns:
- The names of any auxiliary object classes for LDAP entries created from the associated object type, or an empty array if entries should not include any auxiliary object classes.
- Default:
- {}
-
-
-
superiorClass
java.lang.String[] superiorClass
The names of any superior object classes for the structural and auxiliary object classes that should be included in generated entries.- Returns:
- The names of any superior object classes for the structural and auxiliary object classes that should be included in generated entries, or an empty array if no superior classes should be included.
- Default:
- {}
-
-