net.sf.farrago.ddl.gen
Class DdlGenerator.MyComparator
java.lang.Object
net.sf.farrago.ddl.gen.DdlGenerator.MyComparator
- All Implemented Interfaces:
- Comparator<RefBaseObject>
- Enclosing class:
- DdlGenerator
private static class DdlGenerator.MyComparator
- extends Object
- implements Comparator<RefBaseObject>
Comparator for schema elements to ensure that export file occurs in an
intuitive order.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classes
private final Class[] classes
DdlGenerator.MyComparator
private DdlGenerator.MyComparator()
compare
public int compare(RefBaseObject o1,
RefBaseObject o2)
- Specified by:
compare
in interface Comparator<RefBaseObject>
compareClass
private int compareClass(Object o1,
Object o2)
- Compares objects by their class. An object sorts earlier if its class
is higher in the pecking order.
findClass
private int findClass(Object o)
- Returns the ordinal of an object's class in the pecking order, or
Integer.MAX_VALUE
if not found.
compareModelElements
private int compareModelElements(CwmModelElement me1,
CwmModelElement me2)
- Compares two model elements of the same type by their position in the
hierarchy.