org.alfresco.util.schemacomp
Class Results

java.lang.Object
  extended by org.alfresco.util.schemacomp.Results
All Implemented Interfaces:
java.lang.Iterable

public class Results
extends java.lang.Object
implements java.lang.Iterable

Collects differences so that tools can report on or respond to differences between database schemas.


Constructor Summary
Results()
           
 
Method Summary
 void add(Difference.Where where, DbProperty left, DbProperty right)
           
 void add(Difference.Where where, DbProperty left, DbProperty right, Result.Strength strength)
          Record a difference between two objects, or specify that an object only appears in either the 'left' or 'right' schemas.
 void add(Result result)
           
 Result get(int i)
          Get the ith result.
 java.util.Iterator iterator()
          Obtain an iterator for the top-level items held in this schema - since this is a hierarchical model, deeper items are obtained by navigating through the top-level items.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Results

public Results()
Method Detail

add

public void add(Difference.Where where,
                DbProperty left,
                DbProperty right,
                Result.Strength strength)
Record a difference between two objects, or specify that an object only appears in either the 'left' or 'right' schemas.

Parameters:
where - The type of difference, see Difference.Where
left - Left value, or null if the item appears in the right, but not left schema.
right - Right value, or null if the item appears in the left, but not right schema.
strength - The Result.Strength of the difference, e.g. WARN or ERROR.

add

public void add(Difference.Where where,
                DbProperty left,
                DbProperty right)

add

public void add(Result result)

iterator

public java.util.Iterator iterator()
Obtain an iterator for the top-level items held in this schema - since this is a hierarchical model, deeper items are obtained by navigating through the top-level items.

Specified by:
iterator in interface java.lang.Iterable

get

public Result get(int i)
Get the ith result.

Parameters:
i -
Returns:
Result

size

public int size()
Returns:
How many top-level items are in the schema.


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