Class UniqueMemberComparator
- java.lang.Object
-
- org.apache.directory.api.ldap.model.schema.AbstractSchemaObject
-
- org.apache.directory.api.ldap.model.schema.LoadableSchemaObject
-
- org.apache.directory.api.ldap.model.schema.LdapComparator<String>
-
- 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
-
-
Constructor Summary
Constructors Constructor Description UniqueMemberComparator(String oid)
The IntegerComparator constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(String dnstr1, String dnstr2)
Dn
getDn(Object obj)
Get the DN from the given objectvoid
setSchemaManager(SchemaManager schemaManager)
Store the SchemaManager in this instance.-
Methods inherited from class org.apache.directory.api.ldap.model.schema.LdapComparator
equals, getNormalizer, hashCode, 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, copy, getDescription, getExtension, getExtensions, getName, getNames, getObjectType, getOid, getSchemaName, getSpecification, hasExtension, isDisabled, isEnabled, isObsolete, lock, setDescription, setEnabled, setExtensions, setNames, setNames, setObsolete, setOid, setSchemaName, setSpecification, unlock
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
UniqueMemberComparator
public UniqueMemberComparator(String oid)
The IntegerComparator constructor. Its OID is the IntegerOrderingMatch matching rule OID.- Parameters:
oid
- The Comparator's OID
-
-
Method Detail
-
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 classLdapComparator<String>
- Parameters:
schemaManager
- the schemaManager to store
-
getDn
public Dn getDn(Object obj) throws LdapInvalidDnException
Get the DN from the given object- Parameters:
obj
- The object containing a DN (either as an instance of Dn or as a String)- Returns:
- A Dn instance
- Throws:
LdapInvalidDnException
- If the Dn is invalid
-
-