| | |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.UnknownSchemaElementException; |
| | | import org.opends.server.backends.RebuildConfig; |
| | | import org.opends.server.backends.VerifyConfig; |
| | | import org.opends.server.core.AddOperation; |
| | |
| | | } |
| | | |
| | | String matchingRuleID = filter.getMatchingRuleID(); |
| | | MatchingRule matchingRule = matchingRuleID != null |
| | | ? DirectoryServer.getMatchingRule(matchingRuleID) |
| | | : attrType.getEqualityMatchingRule(); |
| | | MatchingRule matchingRule = getMatchingRule(attrType, matchingRuleID); |
| | | // FIXME isIndexed() always return false down below |
| | | return matchingRule != null && isIndexed(attrType, matchingRule); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private MatchingRule getMatchingRule(AttributeType attrType, String matchingRuleID) |
| | | { |
| | | if (matchingRuleID == null) |
| | | { |
| | | return attrType.getEqualityMatchingRule(); |
| | | } |
| | | |
| | | try |
| | | { |
| | | return DirectoryServer.getSchema().getMatchingRule(matchingRuleID); |
| | | } |
| | | catch (UnknownSchemaElementException e) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Retrieves the requested entry from this backend. The caller is not required to hold any locks |
| | | * on the specified DN. |