Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.javatools.db.diff
Class DiffEngine

java.lang.Object
  extended by oracle.javatools.db.diff.DiffEngine


public final class DiffEngine
extends java.lang.Object

Engine that can diff two objects and return the results.

Since:
10.1.3

Constructor Summary
DiffEngine()
           
DiffEngine(boolean allowMultipleDiffers)
           
DiffEngine(DiffEngine existing)
          Create a new diff engine with the same differs as an existing one

 

Method Summary
 void cancelDiff()
           
 void checkProgress()
           
 DiffEngine copy()
          Creates a copy of this diff engine with all the same comparators and differs registered.
 DiffContext diff(java.util.List a, java.util.List b, ResultSet r, DiffContext dc)
          Diff the given object lists with the prepared context.
 DiffContext diff(java.lang.Object[] a, java.lang.Object[] b)
          Diff the given objects.
 DiffContext diff(java.lang.Object[] a, java.lang.Object[] b, ResultSet r)
          Diff the given object arrays.
 DiffContext diff(java.lang.Object[] a, java.lang.Object[] b, ResultSet r, DiffContext dc)
          Diff the given object arrays with the prepared context.
 DiffContext diff(java.lang.Object a, java.lang.Object b)
          Diff the given objects.
 DiffContext diff(java.lang.Object a, java.lang.Object b, ResultSet r, DiffContext dc)
          Diff the given objects with the prepared context.
 java.util.Comparator getComparator(java.lang.Class type)
           
 void registerComparator(java.util.Comparator cmp, java.lang.Class c)
          Registers a Comparator for a given object type.
 void registerDiffer(Differ d, java.lang.Class c)
          Registers a given Differ implementation with an object type (to be used by only this DiffEngine instance)
 void registerListDiffer(Differ d, java.lang.Class c)
          Registers a given Differ implementation with a List of object type (to be used by only this DiffEngine instances)
static
<T> T
searchMap(java.util.Map<java.lang.Class,T> map, java.lang.Class type)
          Iteratively searchs a map of classes to <T> for the given class.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

DiffEngine

public DiffEngine()

DiffEngine

public DiffEngine(boolean allowMultipleDiffers)

DiffEngine

public DiffEngine(DiffEngine existing)
Create a new diff engine with the same differs as an existing one

Method Detail

diff

public DiffContext diff(java.lang.Object a,
                        java.lang.Object b)
Diff the given objects.

diff

public DiffContext diff(java.lang.Object[] a,
                        java.lang.Object[] b)
Diff the given objects.

diff

public DiffContext diff(java.lang.Object a,
                        java.lang.Object b,
                        ResultSet r,
                        DiffContext dc)
Diff the given objects with the prepared context.

diff

public DiffContext diff(java.lang.Object[] a,
                        java.lang.Object[] b,
                        ResultSet r)
Diff the given object arrays. Used to compare ordered lists of children.

diff

public DiffContext diff(java.lang.Object[] a,
                        java.lang.Object[] b,
                        ResultSet r,
                        DiffContext dc)
Diff the given object arrays with the prepared context. Used to compare ordered lists of children.

diff

public DiffContext diff(java.util.List a,
                        java.util.List b,
                        ResultSet r,
                        DiffContext dc)
Diff the given object lists with the prepared context. Used to compare ordered lists of children.

registerDiffer

public void registerDiffer(Differ d,
                           java.lang.Class c)
Registers a given Differ implementation with an object type (to be used by only this DiffEngine instance)

registerListDiffer

public void registerListDiffer(Differ d,
                               java.lang.Class c)
Registers a given Differ implementation with a List of object type (to be used by only this DiffEngine instances)

registerComparator

public void registerComparator(java.util.Comparator cmp,
                               java.lang.Class c)
Registers a Comparator for a given object type. Comparators are used to compare the contents and ordering of a child list to decide whether children have been added, removed or reordered. The registered Comparator will only be used by this DiffEngine instance.

searchMap

public static <T> T searchMap(java.util.Map<java.lang.Class,T> map,
                              java.lang.Class type)
Iteratively searchs a map of classes to <T> for the given class. If the given class isn't found it's imlemented interfaces are searched for. If they are not found, the superclass is recursively checked. If nothing is registered for the Object class, null is returned.

getComparator

public java.util.Comparator getComparator(java.lang.Class type)

checkProgress

public void checkProgress()

cancelDiff

public void cancelDiff()

copy

public DiffEngine copy()
Creates a copy of this diff engine with all the same comparators and differs registered.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


Copyright © 1997, 2012, Oracle. All rights reserved.