@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ModificationType extends java.lang.Object implements java.io.Serializable
ADD
, DELETE
, REPLACE
, or
INCREMENT
values, although it is possible to create a new
modification type with a specified integer value if necessary using the
valueOf(int)
method. The following modification types are defined:
ADD
-- Indicates that the provided value(s) should be added to
the specified attribute in the target entry. If the attribute does not
already exist, it will be created. If it does exist, then the new
values will be merged added to the existing values. At least one value
must be provided with the ADD
modification type, and none of
those values will be allowed to exist in the entry.DELETE
-- Indicates that the specified attribute or attribute
values should be removed from the entry. If no values are provided,
then the entire attribute will be removed. If one or more values are
given, then only those values will be removed. If any values are
provided, then all of those values must exist in the target entry.REPLACE
-- Indicates that the set of values for the specified
attribute should be replaced with the provided value(s). If no values
are given, then the specified attribute will be removed from the entry
if it exists, or no change will be made. If one or more values are
provided, then those values will replace the existing values if the
attribute already exists, or a new attribute will be added with those
values if there was previously no such attribute in the entry.INCREMENT
-- Indicates that the value of the specified
attribute should be incremented. The target entry must have exactly
one value for the specified attribute and it must be an integer. The
modification must include exactly one value, and it must be an integer
which specifies the amount by which the existing value is to be
incremented (or decremented, if the provided value is negative).Modifier and Type | Field and Description |
---|---|
static ModificationType |
ADD
A predefined add modification type, which indicates that the associated
value(s) should be added to the specified attribute in the target entry.
|
static int |
ADD_INT_VALUE
The integer value for the "add" modification type.
|
static ModificationType |
DELETE
A predefined delete modification type, which indicates that the specified
attribute or attribute values should be removed from the entry.
|
static int |
DELETE_INT_VALUE
The integer value for the "delete" modification type.
|
static ModificationType |
INCREMENT
A predefined increment modification type, which indicates that the value of
the specified attribute should be incremented.
|
static int |
INCREMENT_INT_VALUE
The integer value for the "increment" modification type.
|
static ModificationType |
REPLACE
A predefined replace modification type, which indicates that the set of
values for the specified attribute should be replaced with the provided
value(s).
|
static int |
REPLACE_INT_VALUE
The integer value for the "replace" modification type.
|
Modifier and Type | Method and Description |
---|---|
static ModificationType |
definedValueOf(int intValue)
Retrieves the predefined modification type with the specified integer
value.
|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this modification type.
|
java.lang.String |
getName()
Retrieves the name for this modification type.
|
int |
hashCode()
The hash code for this modification type.
|
int |
intValue()
Retrieves the integer value for this modification type.
|
java.lang.String |
toString()
Retrieves a string representation of this modification type.
|
static ModificationType |
valueOf(int intValue)
Retrieves the modification type with the specified integer value.
|
static ModificationType[] |
values()
Retrieves an array of all modification types defined in the LDAP SDK.
|
public static final int ADD_INT_VALUE
@NotNull public static final ModificationType ADD
ADD
modification type,
and none of those values will be allowed to exist in the entry.public static final int DELETE_INT_VALUE
@NotNull public static final ModificationType DELETE
public static final int REPLACE_INT_VALUE
@NotNull public static final ModificationType REPLACE
public static final int INCREMENT_INT_VALUE
@NotNull public static final ModificationType INCREMENT
@NotNull public java.lang.String getName()
public int intValue()
@NotNull public static ModificationType valueOf(int intValue)
intValue
- The integer value for which to retrieve the corresponding
modification type.@Nullable public static ModificationType definedValueOf(int intValue)
intValue
- The integer value for which to retrieve the corresponding
modification type.null
if the provided integer value does not represent a
defined modification type.@NotNull public static ModificationType[] values()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.true
if the provided object is a modification type that is
equal to this modification type, or false
if not.