Package org.apache.openjpa.meta
Class MetaDataInheritanceComparator
- java.lang.Object
-
- org.apache.openjpa.meta.InheritanceComparator
-
- org.apache.openjpa.meta.MetaDataInheritanceComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator
- Direct Known Subclasses:
AnnotationPersistenceMetaDataSerializer.SerializationComparator
,XMLPersistenceMetaDataSerializer.SerializationComparator
public class MetaDataInheritanceComparator extends InheritanceComparator
Comparator that keeps metadatas in inheritance order. Also places relation types used as primary keys before the primary key field owner types.- Author:
- Abe White
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetaDataInheritanceComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
protected java.lang.Class
toClass(java.lang.Object elem)
Subclasses can override this method to extract the class to compare on from the elements of the collection.-
Methods inherited from class org.apache.openjpa.meta.InheritanceComparator
getBase, setBase
-
-
-
-
Method Detail
-
toClass
protected java.lang.Class toClass(java.lang.Object elem)
Description copied from class:InheritanceComparator
Subclasses can override this method to extract the class to compare on from the elements of the collection.- Overrides:
toClass
in classInheritanceComparator
-
compare
public int compare(java.lang.Object o1, java.lang.Object o2)
- Specified by:
compare
in interfacejava.util.Comparator
- Overrides:
compare
in classInheritanceComparator
-
-