typeComparators.put(typeName, typeComparator);
}
public int compare(Object o1, Object o2) {
if ( (o1 instanceof JahiaObject) && (o2 instanceof JahiaObject)) {
JahiaObject leftJahiaObject = (JahiaObject) o1;
JahiaObject rightJahiaObject = (JahiaObject) o2;
if (!leftJahiaObject.getObjectKey().getType().equals(rightJahiaObject.getObjectKey().getType())) {
return leftJahiaObject.getObjectKey().compareTo(rightJahiaObject.getObjectKey());
}
// object key types are equals if we got this far, we must now
// dispatch to a type-specific comparator.
Comparator typeComparator = (Comparator) typeComparators.get(leftJahiaObject.getObjectKey().getType());
if (typeComparator == null) {