org.alfresco.util.schemacomp
Class DefaultComparisonUtilsTest.DatabaseObject

java.lang.Object
  extended by org.alfresco.util.schemacomp.model.AbstractDbObject
      extended by org.alfresco.util.schemacomp.DefaultComparisonUtilsTest.DatabaseObject
All Implemented Interfaces:
DbObject
Enclosing class:
DefaultComparisonUtilsTest

public static class DefaultComparisonUtilsTest.DatabaseObject
extends AbstractDbObject


Field Summary
 
Fields inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
comparisonUtils
 
Constructor Summary
DefaultComparisonUtilsTest.DatabaseObject(java.lang.String name)
           
DefaultComparisonUtilsTest.DatabaseObject(java.lang.String name, DbObject[] equivalentObjects)
           
 
Method Summary
 void accept(DbObjectVisitor visitor)
          Allows a visitor to be invoked against this DbObject.
protected  void doDiff(DbObject right, DiffContext ctx, Result.Strength strength)
          Override this method to provide subclass specific diffing logic.
 boolean sameAs(DbObject other)
          Are the two DbObjects logically the same? For example two Index objects may have different names, but are the same index as they both index the same columns for the same table.
 
Methods inherited from class org.alfresco.util.schemacomp.model.AbstractDbObject
diff, equals, getName, getNameStrength, getParent, getTypeName, getValidators, hashCode, setComparisonUtils, setName, setNameStrength, setParent, setValidators, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultComparisonUtilsTest.DatabaseObject

public DefaultComparisonUtilsTest.DatabaseObject(java.lang.String name)

DefaultComparisonUtilsTest.DatabaseObject

public DefaultComparisonUtilsTest.DatabaseObject(java.lang.String name,
                                                 DbObject[] equivalentObjects)
Method Detail

accept

public void accept(DbObjectVisitor visitor)
Description copied from interface: DbObject
Allows a visitor to be invoked against this DbObject. Implementations should ensure that child objects are visited first (by calling accept on them) before invoking the visitor on itself.


doDiff

protected void doDiff(DbObject right,
                      DiffContext ctx,
                      Result.Strength strength)
Description copied from class: AbstractDbObject
Override this method to provide subclass specific diffing logic.

Overrides:
doDiff in class AbstractDbObject

sameAs

public boolean sameAs(DbObject other)
Description copied from interface: DbObject
Are the two DbObjects logically the same? For example two Index objects may have different names, but are the same index as they both index the same columns for the same table.

If two objects a and b have the same logical identity, it does not mean that a.equals(b) == true. The two objects may well have differences and will be flagged as such by the schema comparison tool. When a.sameAs(b) == true it makes it easier to show the differences as related, i.e. a and b are different rather than, a is only in the 'left' tree and b is only in the 'right' tree.

Specified by:
sameAs in interface DbObject
Overrides:
sameAs in class AbstractDbObject
Returns:


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.