|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.entry.DeltaEntry
public class DeltaEntry
This class implements static methods to perform Delta operations on Entries and Attributes.
Field Summary | |
---|---|
static int |
COMPARE_ATTRIBUTE_KEY
|
static int |
COMPARE_ATTRIBUTE_NAMES
|
static int |
COMPARE_ATTRIBUTE_VALUES
|
Constructor Summary | |
---|---|
DeltaEntry()
|
Method Summary | |
---|---|
static void |
applyAttributeDelta(Attribute target,
Attribute delta)
This method applies the change operations in delta to the
target attribute. |
static void |
applyDelta(Entry target,
Entry delta)
Forwards the call to applyDelta(target, delta, false). |
static void |
applyDelta(Entry target,
Entry delta,
boolean removeUnchanged)
This method applies the delta operations specified in delta to the target entry. |
static Entry |
compareEntries(Entry source,
Entry target,
boolean unchanged,
int level,
String key)
This method returns an Entry that contains the delta changes needed to make target equal to source. |
static Entry |
compareEntries(Entry source,
Entry target,
boolean unchanged,
int level,
String key,
List<String> attributeList,
boolean isInvertedIgnore)
This method returns an Entry that contains delta changes for specific attributes. |
static Entry |
getDeltaEntry(Entry source,
Entry target)
This method is a convenience method that calls compareEntries(source, target, false, null); |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COMPARE_ATTRIBUTE_KEY
public static final int COMPARE_ATTRIBUTE_NAMES
public static final int COMPARE_ATTRIBUTE_VALUES
Constructor Detail |
---|
public DeltaEntry()
Method Detail |
---|
public static Entry getDeltaEntry(Entry source, Entry target) throws Exception
compareEntries(source, target, false, null);
source
- The source entrytarget
- The target entry
Exception
public static Entry compareEntries(Entry source, Entry target, boolean unchanged, int level, String key) throws Exception
After comparing two entries at level 3, you can apply the returned delta entry to make target equal to source by calling the applyDelta ( target, delta ) method.
If no changes are detected an empty Entry is returned.
source
- The source entrytarget
- The target entryunchanged
- If true, returned entry contains unmodified attributes and
values as welllevel
- The number of levels to compare: 1 entry (requires key), 2
attribute names, 3 attribute valueskey
- The name of the key attribute. This parameter must be
specified if level == 1.
Exception
public static Entry compareEntries(Entry source, Entry target, boolean unchanged, int level, String key, List<String> attributeList, boolean isInvertedIgnore) throws Exception
source
- The source entrytarget
- The target entryunchanged
- If true
, returned entry contains unmodified
Attributes and valueslevel
- The number of levels to compare: 1 entry (requires key), 2
attribute names, 3 attribute valueskey
- The name of the key attribute. This parameter must be
specified if level == 1.attributeList
- List of attributes whose changes will be either detected or
ignoredisInvertedIgnore
- If true
changes only in attributes listed in
attributeList
parameter will be detected; else
changes in these attributes will be ignored.
Exception
compareEntries(Entry, Entry, boolean, int, String)
public static void applyDelta(Entry target, Entry delta) throws Exception
Exception
public static void applyDelta(Entry target, Entry delta, boolean removeUnchanged) throws Exception
Only attributes and values with explicit change operations are processed. Attributes with the ATTRIBUTE_UNCHANGED flag and values with either AV_UNDEFINED or AV_UNCHANGED are not processed.
target
- The entry to which changes are applieddelta
- The entry that contains the changes to applyremoveUnchanged
- If true, the unmodified attributes are removed from the target
entry leaving only modified attributes
Exception
public static void applyAttributeDelta(Attribute target, Attribute delta)
delta
to the
target
attribute. Value operations with either AV_UNDEFINED
or AV_UNCHANGED are ignored.
target
- The attribute to modifydelta
- The attribute containing value operations
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |