Package org.apache.openjpa.persistence
Class AnnotationPersistenceMetaDataSerializer.SerializationComparator
- java.lang.Object
-
- org.apache.openjpa.meta.InheritanceComparator
-
- org.apache.openjpa.meta.MetaDataInheritanceComparator
-
- org.apache.openjpa.persistence.AnnotationPersistenceMetaDataSerializer.SerializationComparator
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Comparator
- Direct Known Subclasses:
AnnotationPersistenceMappingSerializer.MappingSerializationComparator
- Enclosing class:
- AnnotationPersistenceMetaDataSerializer
protected class AnnotationPersistenceMetaDataSerializer.SerializationComparator extends MetaDataInheritanceComparator
Compares clases, sequences, and queries to order them for serialization. Places sequences first, then classes, then queries. Sequences and queries are ordered alphabetically by name. Classes are placed in listing order, in inheritance order within that, and in alphabetical order within that.- Author:
- Stephen Kim
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SerializationComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(java.lang.Object o1, java.lang.Object o2)
protected int
compareUnknown(java.lang.Object o1, java.lang.Object o2)
Compare two unrecognized elements of the same type.-
Methods inherited from class org.apache.openjpa.meta.MetaDataInheritanceComparator
toClass
-
Methods inherited from class org.apache.openjpa.meta.InheritanceComparator
getBase, setBase
-
-
-
-
Method Detail
-
compare
public int compare(java.lang.Object o1, java.lang.Object o2)
- Specified by:
compare
in interfacejava.util.Comparator
- Overrides:
compare
in classMetaDataInheritanceComparator
-
compareUnknown
protected int compareUnknown(java.lang.Object o1, java.lang.Object o2)
Compare two unrecognized elements of the same type. Throws exception by default.
-
-