Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.javatools.db.diff
Class GenericBeanDiffer

java.lang.Object
  extended by oracle.javatools.db.diff.GenericBeanDiffer
All Implemented Interfaces:
Differ
Direct Known Subclasses:
GenericNameDiffer

public class GenericBeanDiffer
extends java.lang.Object
implements Differ

Differ for any object that uses the PropertyInfos provided by PropertyIterator and diffs the values for those PropertyInfos using the engine.


Constructor Summary
GenericBeanDiffer()
           
 
Method Summary
 boolean diff(java.lang.Object a, java.lang.Object b, ResultSet r, DiffContext c)
          If the objects being diffed are beans this method returns true - i.e.
protected  ResultSet diffProperty(java.lang.Object a, java.lang.Object b, ResultSet r, DiffContext c, PropertyInfo prop)
          Three types of property are supported
1) those that convert to strings - convert to strings and compare
2) array properties - diff them with the engine as lists
3) other objects - let the diff engine decide what to do with them
protected  boolean ignoreProperty(PropertyInfo prop)
          Ignores the given property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericBeanDiffer

public GenericBeanDiffer()
Method Detail

diff

public boolean diff(java.lang.Object a,
                    java.lang.Object b,
                    ResultSet r,
                    DiffContext c)
If the objects being diffed are beans this method returns true - i.e. we diffed. If a or b are null no diffing is actually done, the result set is just marked as not the same.

Specified by:
diff in interface Differ
Returns:
true if the diff operation has been performed by this Differ.

diffProperty

protected ResultSet diffProperty(java.lang.Object a,
                                 java.lang.Object b,
                                 ResultSet r,
                                 DiffContext c,
                                 PropertyInfo prop)
Three types of property are supported
1) those that convert to strings - convert to strings and compare
2) array properties - diff them with the engine as lists
3) other objects - let the diff engine decide what to do with them


ignoreProperty

protected boolean ignoreProperty(PropertyInfo prop)
Ignores the given property. Override to provide different implementation.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

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