|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.entry.AbstractValue<T>
public abstract class AbstractValue<T>
A wrapper around byte[] values in entries.
| Field Summary | |
|---|---|
protected AttributeType |
attributeType
reference to the attributeType zssociated with the value |
protected int |
h
The computed hashcode. |
protected static org.slf4j.Logger |
LOG
logger for reporting errors that might not be handled properly upstream |
protected T |
normalizedValue
the canonical representation of the wrapped value |
protected T |
wrappedValue
the wrapped binary value |
| Fields inherited from interface org.apache.directory.api.ldap.model.entry.Value |
|---|
BINARY, STRING |
| Constructor Summary | |
|---|---|
AbstractValue()
|
|
| Method Summary | |
|---|---|
protected void |
apply(AttributeType attributeType)
Apply an AttributeType to the current Value, normalizing it. |
Value<T> |
clone()
Clone a Value |
AttributeType |
getAttributeType()
Get the associated AttributeType |
byte[] |
getBytes()
Get the wrapped value as a byte[]. |
protected LdapComparator<T> |
getLdapComparator()
Gets a comparator using getMatchingRule() to resolve the matching that the comparator is extracted from. |
T |
getNormReference()
Gets a reference to the the normalized (canonical) representation for the wrapped value. |
T |
getReference()
Gets a reference to the wrapped value. |
String |
getString()
Get the wrapped value as a String. |
boolean |
isInstanceOf(AttributeType attributeType)
Check if the value is stored into an instance of the given AttributeType, or one of its ascendant. |
boolean |
isNull()
Check if the contained value is null or not |
boolean |
isSchemaAware()
Tells if the value is schema aware or not. |
boolean |
isValid(SyntaxChecker syntaxChecker)
Uses the syntaxChecker associated with the attributeType to check if the value is valid. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.directory.api.ldap.model.entry.Value |
|---|
getNormValue, getValue, isHumanReadable, length |
| Methods inherited from interface java.io.Externalizable |
|---|
readExternal, writeExternal |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected static final org.slf4j.Logger LOG
protected transient AttributeType attributeType
protected T wrappedValue
protected T normalizedValue
protected volatile int h
| Constructor Detail |
|---|
public AbstractValue()
| Method Detail |
|---|
public Value<T> clone()
clone in interface Value<T>clone in class Objectpublic T getReference()
getReference in interface Value<T>public String getString()
getString in interface Value<T>public byte[] getBytes()
getBytes in interface Value<T>public AttributeType getAttributeType()
getAttributeType in interface Value<T>
protected void apply(AttributeType attributeType)
throws LdapInvalidAttributeValueException
attributeType - The AttributeType to apply
LdapInvalidAttributeValueException - If the value is not valid accordingly
to the schema
protected final LdapComparator<T> getLdapComparator()
throws LdapException
LdapException - if resolution of schema entities failpublic boolean isInstanceOf(AttributeType attributeType)
isInstanceOf in interface Value<T>attributeType - The AttributeType we are looking at
true if the value is associated with the given
attributeType or one of its ascendantpublic T getNormReference()
getNormReference in interface Value<T>public final boolean isNull()
isNull in interface Value<T>true if the inner value is null.
public final boolean isValid(SyntaxChecker syntaxChecker)
throws LdapInvalidAttributeValueException
isValid in interface Value<T>syntaxChecker - the SyntaxChecker to use to validate the value
true if the value is valid
LdapInvalidAttributeValueException - if the value cannot be validatedpublic final boolean isSchemaAware()
isSchemaAware in interface Value<T>true if the value is sxhema aware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||