org.apache.directory.api.ldap.model.schema.comparators
Class UniqueMemberComparator

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<String>
              extended by org.apache.directory.api.ldap.model.schema.comparators.UniqueMemberComparator
All Implemented Interfaces:
Serializable, Comparator<String>, SchemaObject

public class UniqueMemberComparator
extends LdapComparator<String>

A comparator that sorts OIDs based on their numeric id value. Needs a OidRegistry to properly do it's job. Public method to set the oid registry will be used by the server after instantiation in deserialization.

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
UniqueMemberComparator(String oid)
          The IntegerComparator constructor.
 
Method Summary
 int compare(String dnstr1, String dnstr2)
          Implementation of the Compare method
 Dn getDn(Object obj)
           
 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

UniqueMemberComparator

public UniqueMemberComparator(String oid)
The IntegerComparator constructor. Its OID is the IntegerOrderingMatch matching rule OID.

Method Detail

compare

public int compare(String dnstr1,
                   String dnstr2)
Implementation of the Compare method


setSchemaManager

public void setSchemaManager(SchemaManager schemaManager)
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<String>
Parameters:
schemaManager - the schemaManager to store

getDn

public Dn getDn(Object obj)
         throws LdapInvalidDnException
Throws:
LdapInvalidDnException


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