| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.api; |
| | | |
| | |
| | | import org.opends.server.types.ByteString; |
| | | import org.opends.server.types.ConditionResult; |
| | | |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static |
| | | org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | |
| | | |
| | | |
| | |
| | | public abstract class EqualityMatchingRule |
| | | extends MatchingRule |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.api.EqualityMatchingRule"; |
| | | |
| | | |
| | | |
| | |
| | | public ConditionResult valuesMatch(ByteString attributeValue, |
| | | ByteString assertionValue) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "valuesMatch", |
| | | String.valueOf(attributeValue), |
| | | String.valueOf(assertionValue)); |
| | | |
| | | if (areEqual(attributeValue, assertionValue)) |
| | | { |
| | |
| | | */ |
| | | public int generateHashCode(AttributeValue attributeValue) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "generateHashCode", |
| | | String.valueOf(attributeValue)); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "generateHashCode", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | assert debugException(CLASS_NAME, "generateHashCode", e2); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | return 0; |
| | | } |