Class AbstractQValue
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.value.AbstractQValue
-
- All Implemented Interfaces:
Serializable,org.apache.jackrabbit.spi.QValue
- Direct Known Subclasses:
DefaultQValue
public abstract class AbstractQValue extends Object implements org.apache.jackrabbit.spi.QValue, Serializable
AbstractQValue...- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractQValue(Boolean value)Create a newAbstractQValue.protectedAbstractQValue(Double value)Create a newAbstractQValue.protectedAbstractQValue(Long value)Create a newAbstractQValue.protectedAbstractQValue(Object value, int type)Create a newAbstractQValue.protectedAbstractQValue(String value, int type)Create a newAbstractQValue.protectedAbstractQValue(BigDecimal value)Create a newAbstractQValue.protectedAbstractQValue(URI value)Create a newAbstractQValue.protectedAbstractQValue(Calendar value)Create a newAbstractQValue.protectedAbstractQValue(org.apache.jackrabbit.spi.Name value)Create a newAbstractQValue.protectedAbstractQValue(org.apache.jackrabbit.spi.Path value)Create a newAbstractQValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddiscard()booleanequals(Object obj)Default implementation of the equals method.BinarygetBinary()This implementation creates a binary instance that usesQValue.getStream()and skipping on the given stream as its underlying mechanism to provide random access defined onBinary.booleangetBoolean()CalendargetCalendar()BigDecimalgetDecimal()doublegetDouble()longgetLength()longgetLong()org.apache.jackrabbit.spi.NamegetName()org.apache.jackrabbit.spi.PathgetPath()StringgetString()intgetType()URIgetURI()inthashCode()Default calculation of the hashCode.StringtoString()Returns the string representation of this internal value.
-
-
-
Field Detail
-
val
protected final Object val
-
type
protected final int type
-
-
Constructor Detail
-
AbstractQValue
protected AbstractQValue(Object value, int type)
Create a newAbstractQValue.- Parameters:
value- The value.type- The property type.- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(String value, int type)
Create a newAbstractQValue.- Parameters:
value-type-- Throws:
IllegalArgumentException- if the passedvalueisnullor if thetypeis neither STRING nor REFERENCE/WEAKREFERENCE.
-
AbstractQValue
protected AbstractQValue(Long value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(Double value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(Boolean value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(Calendar value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(org.apache.jackrabbit.spi.Name value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(org.apache.jackrabbit.spi.Path value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(BigDecimal value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
AbstractQValue
protected AbstractQValue(URI value)
Create a newAbstractQValue.- Parameters:
value-- Throws:
IllegalArgumentException- if the passedvalueisnull.
-
-
Method Detail
-
getType
public int getType()
- Specified by:
getTypein interfaceorg.apache.jackrabbit.spi.QValue- See Also:
QValue.getType()
-
getLength
public long getLength() throws RepositoryException- Specified by:
getLengthin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getLength()
-
getName
public org.apache.jackrabbit.spi.Name getName() throws RepositoryException- Specified by:
getNamein interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getName()
-
getCalendar
public Calendar getCalendar() throws RepositoryException
- Specified by:
getCalendarin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getCalendar()
-
getDecimal
public BigDecimal getDecimal() throws RepositoryException
- Specified by:
getDecimalin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getDecimal()
-
getURI
public URI getURI() throws RepositoryException
- Specified by:
getURIin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getURI()
-
getDouble
public double getDouble() throws RepositoryException- Specified by:
getDoublein interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getDouble()
-
getLong
public long getLong() throws RepositoryException- Specified by:
getLongin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getLong()
-
getBoolean
public boolean getBoolean() throws RepositoryException- Specified by:
getBooleanin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getBoolean()
-
getPath
public org.apache.jackrabbit.spi.Path getPath() throws RepositoryException- Specified by:
getPathin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getPath()
-
getString
public String getString() throws RepositoryException
- Specified by:
getStringin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getPath()
-
getBinary
public Binary getBinary() throws RepositoryException
This implementation creates a binary instance that usesQValue.getStream()and skipping on the given stream as its underlying mechanism to provide random access defined onBinary.- Specified by:
getBinaryin interfaceorg.apache.jackrabbit.spi.QValue- Throws:
RepositoryException- See Also:
QValue.getBinary()
-
discard
public void discard()
- Specified by:
discardin interfaceorg.apache.jackrabbit.spi.QValue- See Also:
QValue.discard()
-
toString
public String toString()
Returns the string representation of this internal value.
-
equals
public boolean equals(Object obj)
Default implementation of the equals method. Subclasses may optimize this e.g. by special handling for DATE properties.- Overrides:
equalsin classObject- Parameters:
obj-- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
Default calculation of the hashCode. Subclasses may optimize this e.g. by special handling for DATE properties.- Overrides:
hashCodein classObject- Returns:
- the hashCode of the internal value object.
- See Also:
Object.hashCode()
-
-