Package com.unboundid.ldap.sdk.persist
Enum FilterUsage
- All Implemented Interfaces:
Serializable,Comparable<FilterUsage>,java.lang.constant.Constable
This enumeration defines a set of options that indicate how the value of a
field or getter method may be used in the process of constructing a search
filter. The resulting filter will be constructed as a logical AND of
equality components created from the structural object class and any
auxiliary classes, as well as equality components created from the values of
fields with the
If a class has any fields or getter methods with a filter usage of
If a class does not have any fields or getter methods that are marked
LDAPField annotation type and/or the return values of
methods with the LDAPGetter annotation type.
If a class has any fields or getter methods with a filter usage of
REQUIRED, then all fields and/or getter methods marked as
REQUIRED must have a non-null value and will be included in
the filter, and any other fields or getter methods marked as
ALWAYS_ALLOWED or CONDITIONALLY_ALLOWED with non-null
values will be included in the filter as well.
If a class does not have any fields or getter methods that are marked
REQUIRED, then at least one field or getter method marked
ALWAYS_ALLOWED must have a non-null value in order to
generate a search filter from that object, and the resulting filter will
contain components for all non-null fields and/or getter methods
marked ALWAYS_ALLOWED or CONDITIONALLY_ALLOWED. If an object
does not have any non-null fields or getter methods marked
REQUIRED or ALWAYS_ALLOWED, then it will not be possible to
generate a search filter from that object.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIndicates that the associated field or getter method may always be included in a search filter if it has a value, regardless of whether any other fields or getter methods in the object may have values.Indicates that the associated field or getter method may be included in a generated search filter if it has a non-nullvalue, and if at least one field or getter method markedREQUIREDorALWAYS_ALLOWEDhas a non-nullvalue.Indicates that the associated field or getter method will never be included in a search filter generated from an object, regardless of whether it has a value in that object.Indicates that the associated field or getter method must have a value in an object in order to be able to generate a search filter from that object. -
Method Summary
Modifier and TypeMethodDescriptionstatic FilterUsageRetrieves the filter usage with the specified name.static FilterUsageReturns the enum constant of this type with the specified name.static FilterUsage[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
REQUIRED
Indicates that the associated field or getter method must have a value in an object in order to be able to generate a search filter from that object. If an attempt is made to generate a search filter from an object that does not have a value for the associated field or getter method, then an exception will be thrown. -
ALWAYS_ALLOWED
Indicates that the associated field or getter method may always be included in a search filter if it has a value, regardless of whether any other fields or getter methods in the object may have values. If the associated field or getter method does not have a value, then it will be excluded from the generated search filter. It is generally recommended that the corresponding attribute be indexed for equality in the directory server, or that the server otherwise be configured to perform fast equality searches for filters containing this attribute. -
CONDITIONALLY_ALLOWED
Indicates that the associated field or getter method may be included in a generated search filter if it has a non-nullvalue, and if at least one field or getter method markedREQUIREDorALWAYS_ALLOWEDhas a non-nullvalue. This usage indicates that the associated field or getter method may be used to help refine a search filter, but is not sufficient to be included in a search filter by itself. -
EXCLUDED
Indicates that the associated field or getter method will never be included in a search filter generated from an object, regardless of whether it has a value in that object.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forName
Retrieves the filter usage with the specified name.- Parameters:
name- The name of the filter usage to retrieve. It must not benull.- Returns:
- The requested filter usage, or
nullif no such usage is defined.
-