/** * Gets a comparator using getMatchingRule() to resolve the matching * that the comparator is extracted from. * * @return a comparator associated with the attributeType or null if one cannot be found * @throws LdapException if resolution of schema entities fail */ protected LdapComparator<T> getLdapComparator() throws LdapException { if ( attributeType != null ) { MatchingRule mr = getMatchingRule(); if ( mr == null ) { return null; } return (LdapComparator<T>)mr.getLdapComparator(); } else { return null; } }
/** * Delete the MR references (using and usedBy) : * MR -> C * MR -> N * MR -> S */ public void delCrossReferences( MatchingRule matchingRule ) { if ( matchingRule.getLdapComparator() != null ) { delReference( matchingRule, matchingRule.getLdapComparator() ); } if ( matchingRule.getNormalizer() != null ) { delReference( matchingRule, matchingRule.getNormalizer() ); } if ( matchingRule.getSyntax() != null ) { delReference( matchingRule, matchingRule.getSyntax() ); } }
LdapComparator<?> comparator = matchingRule.getLdapComparator();
LdapComparator<K> comp = ( LdapComparator<K> ) mr.getLdapComparator();
if ( matchingRule.getLdapComparator() == null ) if ( !comparatorRegistry.contains( matchingRule.getLdapComparator().getOid() ) ) LOG.debug( "Cannot find the Comparator {} for the MatchingRule {}", matchingRule.getLdapComparator() .getOid(), matchingRule ); if ( !checkReferences( matchingRule, matchingRule.getLdapComparator(), "Comparator" ) )