org.opends.server.types
Class Modification

java.lang.Object
  extended by org.opends.server.types.Modification

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=true,
           mayExtend=false,
           mayInvoke=true)
public final class Modification
extends java.lang.Object

This class defines a data structure for storing and interacting with a modification that may be requested of an entry in the Directory Server.


Constructor Summary
Modification(ModificationType modificationType, Attribute attribute)
          Creates a new modification with the provided information.
Modification(ModificationType modificationType, Attribute attribute, boolean isInternal)
          Creates a new modification with the provided information.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether the provided object is equal to this modification.
 Attribute getAttribute()
          Retrieves the attribute for this modification.
 ModificationType getModificationType()
          Retrieves the modification type for this modification.
 int hashCode()
          Retrieves the hash code for this modification.
 boolean isInternal()
          Indicates whether this is modification was created by internal processing and should not be subject to no-user-modification and related checks.
 void setAttribute(Attribute attribute)
          Specifies the attribute for this modification.
 void setInternal(boolean isInternal)
          Specifies whether this modification was created by internal processing and should not be subject to no-user-modification and related checks.
 void setModificationType(ModificationType modificationType)
          Specifies the modification type for this modification.
 java.lang.String toLDIF()
          Retrieves a string representation of this modification in LDIF form.
 void toLDIF(java.lang.StringBuilder buffer)
          Appends a string representation of this modification in LDIF form to the provided buffer.
 java.lang.String toString()
          Retrieves a one-line string representation of this modification.
 void toString(java.lang.StringBuilder buffer)
          Appends a one-line representation of this modification to the provided buffer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Modification

public Modification(ModificationType modificationType,
                    Attribute attribute)
Creates a new modification with the provided information.

Parameters:
modificationType - The modification type for this modification.
attribute - The attribute for this modification.

Modification

public Modification(ModificationType modificationType,
                    Attribute attribute,
                    boolean isInternal)
Creates a new modification with the provided information.

Parameters:
modificationType - The modification type for this modification.
attribute - The attribute for this modification.
isInternal - Indicates whether this is an internal modification and therefore should not be subject to no-user-modification and related checks.
Method Detail

getModificationType

public ModificationType getModificationType()
Retrieves the modification type for this modification.

Returns:
The modification type for this modification.

setModificationType

@PublicAPI(stability=PRIVATE,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=false)
public void setModificationType(ModificationType modificationType)
Specifies the modification type for this modification.

Parameters:
modificationType - The modification type for this modification.

getAttribute

public Attribute getAttribute()
Retrieves the attribute for this modification.

Returns:
The attribute for this modification.

setAttribute

@PublicAPI(stability=PRIVATE,
           mayInstantiate=false,
           mayExtend=false,
           mayInvoke=false)
public void setAttribute(Attribute attribute)
Specifies the attribute for this modification.

Parameters:
attribute - The attribute for this modification.

isInternal

public boolean isInternal()
Indicates whether this is modification was created by internal processing and should not be subject to no-user-modification and related checks.

Returns:
true if this is an internal modification, or false if not.

setInternal

public void setInternal(boolean isInternal)
Specifies whether this modification was created by internal processing and should not be subject to no-user-modification and related checks.

Parameters:
isInternal - Specifies whether this modification was created by internal processing and should not be subject to no-user-modification and related checks.

equals

public boolean equals(java.lang.Object o)
Indicates whether the provided object is equal to this modification. It will only be considered equal if the object is a modification with the same modification type and an attribute that is equal to this modification.

Overrides:
equals in class java.lang.Object
Parameters:
o - The object for which to make the determination.
Returns:
true if the provided object is a modification that is equal to this modification, or false if not.

hashCode

public int hashCode()
Retrieves the hash code for this modification. The hash code returned will be the hash code for the attribute included in this modification.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code for this modification.

toString

public java.lang.String toString()
Retrieves a one-line string representation of this modification.

Overrides:
toString in class java.lang.Object
Returns:
A one-line string representation of this modification.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a one-line representation of this modification to the provided buffer.

Parameters:
buffer - The buffer to which the information should be appended.

toLDIF

public java.lang.String toLDIF()
Retrieves a string representation of this modification in LDIF form.

Returns:
A string representation of this modification in LDIF form.

toLDIF

public void toLDIF(java.lang.StringBuilder buffer)
Appends a string representation of this modification in LDIF form to the provided buffer.

Parameters:
buffer - The buffer to which the information should be appended.