Package com.unboundid.ldap.sdk.persist
Annotation Type LDAPGetter
This annotation type may be used to mark methods whose return values should
be persisted in an LDAP directory server. It should only be used for methods
in classes that contain the
LDAPObject annotation type. Those
methods must not be static and must have a non-void return type, but
they may have any access modifier (including public,
protected, private, or no access modifier at all indicating
package-level access). The associated attribute must not be referenced by
any other LDAPField or LDAPGetter annotations in the same
class, and it may be referenced by at most one LDAPSetter annotation.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe name of the attribute type in which the associated getter value will be stored in LDAP entries.Class<? extends ObjectEncoder> The class that provides the logic for encoding the method return value to an LDAP attribute.Indicates whether and under what circumstances the value returned from this method may be included in a search filter generated to search for entries that match the object.booleanIndicates whether the value returned from this method should be included in the LDAP entry that is generated when adding a new instance of the associated object to the directory.booleanIndicates whether the value returned from this method should be included in the set of LDAP modifications if it has been changed when modifying an existing instance of the associated object in the directory.booleanIndicates whether the value returned from this method should be included in the RDN of entries created from the associated object.String[]The names of the object classes in which the associated attribute may be used.
-
Element Details
-
inAdd
boolean inAddIndicates whether the value returned from this method should be included in the LDAP entry that is generated when adding a new instance of the associated object to the directory. Note that any getter value which is to be included in entry RDNs will always be included in add operations regardless of the value of this element.- Returns:
trueif the value returned from this method should be included in the LDAP entry that is generated when adding a new instance of the associated object to the directory, orfalseif not.
- Default:
true
-
inModify
boolean inModifyIndicates whether the value returned from this method should be included in the set of LDAP modifications if it has been changed when modifying an existing instance of the associated object in the directory. Note that any getter value which is to be included in entry RDNs will never be included in modify operations regardless of the value of this element.- Returns:
trueif the value returned from this method should be included in the set of LDAP modifications if it has been changed when modifying an existing instance of the associated object in the directory, orfalseif not.
- Default:
true
-
inRDN
boolean inRDNIndicates whether the value returned from this method should be included in the RDN of entries created from the associated object. Any getter value which is to be included entry RDNs will always be included in add operations regardless of the value of theinAdd()element.
When generating an entry DN, the persistence framework will construct an RDN using all fields marked withLDAPFieldthat haveinRDN=trueand all getter methods marked withLDAPGetterthat haveinRDN=true. A class marked withLDAPObjectmust either have at least oneLDAPFieldorLDAPGetterwithinRDN=true, or it must be a direct subclass of another class marked withLDAPObject. If a class has one or more fields and/or getters withinRDN=true, then only those fields/getters will be used to construct the RDN, even if that class is a direct subclass of another class marked withLDAPObject.- Returns:
trueif the value returned from this method should be included in the RDN of entries created from the associated object, orfalseif not.
- Default:
false
-
encoderClass
The class that provides the logic for encoding the method return value to an LDAP attribute.- Returns:
- The encoder class for this getter.
- Default:
com.unboundid.ldap.sdk.persist.DefaultObjectEncoder.class
-
filterUsage
Indicates whether and under what circumstances the value returned from this method may be included in a search filter generated to search for entries that match the object.- Returns:
- The filter usage value for this getter.
- Default:
CONDITIONALLY_ALLOWED
-
attribute
The name of the attribute type in which the associated getter value will be stored in LDAP entries. If this is not provided, then the method name must start with "get" and it will be assumed that the attribute name is the remainder of the method name.- Returns:
- The name of the attribute type in which the associated getter value will be stored in LDAP entries, or an empty string if it will be assumed that the attribute name matches the getter method name without the initial "get".
- Default:
""
-
objectClass
The names of the object classes in which the associated attribute may be used. This is primarily intended for use in generating LDAP schema from Java object types.
Values may include any combination of the structural and/or auxiliary object classes named in theLDAPObjectannotation type for the associated class. If no values are provided, then it will be assumed to be only included in the structural object class.- Returns:
- The names of the object classes in which the associated attribute may be used, or an empty array if it will be assumed to only be included in the structural object class.
- Default:
{}
-