org.apache.directory.api.ldap.model.schema.comparators
Class SerializableComparator<E>

java.lang.Object
  extended by org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
      extended by org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
          extended by org.apache.directory.api.ldap.model.schema.LdapComparator<E>
              extended by org.apache.directory.api.ldap.model.schema.comparators.SerializableComparator<E>
All Implemented Interfaces:
Serializable, Comparator<E>, SchemaObject
Direct Known Subclasses:
UuidComparator

public class SerializableComparator<E>
extends LdapComparator<E>
implements Serializable

A serializable wrapper around a Comparator which uses delayed initialization of the underlying wrapped comparator which is JIT resolved from a static global registry.

Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
description, extensions, isEnabled, isObsolete, isReadOnly, locked, names, objectType, oid, schemaName, specification
 
Constructor Summary
SerializableComparator(String matchingRuleOid)
           
 
Method Summary
 int compare(E o1, E o2)
           
 void setSchemaManager(SchemaManager schemaManager)
          Store the SchemaManager in this instance.
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.LdapComparator
equals, toString
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
copy, getBytecode, getFqcn, isValid, setBytecode, setFqcn
 
Methods inherited from class org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
addExtension, addExtension, addName, clear, compareOid, copy, getDescription, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hashCode, isDisabled, isEnabled, isObsolete, isReadOnly, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setReadOnly, setSchemaName, setSpecification, unlock
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SerializableComparator

public SerializableComparator(String matchingRuleOid)
Method Detail

compare

public int compare(E o1,
                   E o2)
Specified by:
compare in interface Comparator<E>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)

setSchemaManager

public void setSchemaManager(SchemaManager schemaManager)
Description copied from class: LdapComparator
Store the SchemaManager in this instance. It may be necessary for some comparator which needs to have access to the oidNormalizer Map.

Overrides:
setSchemaManager in class LdapComparator<E>
Parameters:
schemaManager - the schemaManager to set


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.