Class QValueValue
- java.lang.Object
-
- org.apache.jackrabbit.spi.commons.value.QValueValue
-
-
Constructor Summary
Constructors Constructor Description QValueValue(QValue qvalue, NamePathResolver resolver)
Constructs aQValueValue
object representing an SPIQValue
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Binary
getBinary()
Returns aBinary
representation of this value.boolean
getBoolean()
Returns aBoolean
representation of this value.Calendar
getDate()
Returns aCalendar
representation of this value.BigDecimal
getDecimal()
Returns aBigDecimal
representation of this value.double
getDouble()
Returns adouble
representation of this value.long
getLong()
Returns along
representation of this value.QValue
getQValue()
Returns the embeddedQValue
.InputStream
getStream()
Returns anInputStream
representation of this value.String
getString()
Returns aString
representation of this value.int
getType()
Returns thetype
of thisValue
.int
hashCode()
-
-
-
Constructor Detail
-
QValueValue
public QValueValue(QValue qvalue, NamePathResolver resolver)
Constructs aQValueValue
object representing an SPIQValue
.- Parameters:
qvalue
- the QValue thisQValueValue
should representresolver
- fore resolving namespace URIs to prefixes in NAME/PATH properties
-
-
Method Detail
-
getQValue
public QValue getQValue()
Returns the embeddedQValue
.- Returns:
- the embedded
QValue
-
getBoolean
public boolean getBoolean() throws RepositoryException
Description copied from interface:Value
Returns aBoolean
representation of this value.- Specified by:
getBoolean
in interfaceValue
- Returns:
- A
Boolean
representation of this value. - Throws:
ValueFormatException
- if conversion to aBoolean
is not possible.RepositoryException
- if another error occurs.- See Also:
Value.getBoolean()
-
getDecimal
public BigDecimal getDecimal() throws ValueFormatException, IllegalStateException, RepositoryException
Description copied from interface:Value
Returns aBigDecimal
representation of this value.- Specified by:
getDecimal
in interfaceValue
- Returns:
- A
BigDecimal
representation of this value. - Throws:
ValueFormatException
- if conversion to aBigDecimal
is not possible.RepositoryException
- if another error occurs.IllegalStateException
- See Also:
Value.getDecimal()
-
getBinary
public Binary getBinary() throws RepositoryException
Description copied from interface:Value
Returns aBinary
representation of this value. TheBinary
object in turn provides methods to access the binary data itself. Uses the standard conversion to binary (see JCR specification).- Specified by:
getBinary
in interfaceValue
- Returns:
- A
Binary
representation of this value. - Throws:
RepositoryException
- if an error occurs.- See Also:
Value.getBinary()
-
getDate
public Calendar getDate() throws RepositoryException
Description copied from interface:Value
Returns aCalendar
representation of this value.The object returned is a copy of the stored value, so changes to it are not reflected in internal storage.
- Specified by:
getDate
in interfaceValue
- Returns:
- A
Calendar
representation of this value. - Throws:
ValueFormatException
- if conversion to aCalendar
is not possible.RepositoryException
- if another error occurs.- See Also:
Value.getDate()
-
getDouble
public double getDouble() throws RepositoryException
Description copied from interface:Value
Returns adouble
representation of this value.- Specified by:
getDouble
in interfaceValue
- Returns:
- A
double
representation of this value. - Throws:
ValueFormatException
- if conversion to adouble
is not possible.RepositoryException
- if another error occurs.- See Also:
Value.getDouble()
-
getLong
public long getLong() throws RepositoryException
Description copied from interface:Value
Returns along
representation of this value.- Specified by:
getLong
in interfaceValue
- Returns:
- A
long
representation of this value. - Throws:
ValueFormatException
- if conversion to anlong
is not possible.RepositoryException
- if another error occurs.- See Also:
Value.getLong()
-
getStream
public InputStream getStream() throws IllegalStateException, RepositoryException
Description copied from interface:Value
Returns anInputStream
representation of this value. Uses the standard conversion to binary (see JCR specification).It is the responsibility of the caller to close the returned
InputStream
.- Specified by:
getStream
in interfaceValue
- Returns:
- An
InputStream
representation of this value. - Throws:
RepositoryException
- if an error occurs.IllegalStateException
- See Also:
Value.getStream()
-
getString
public String getString() throws RepositoryException
Description copied from interface:Value
Returns aString
representation of this value.- Specified by:
getString
in interfaceValue
- Returns:
- A
String
representation of the value of this property. - Throws:
ValueFormatException
- if conversion to aString
is not possible.RepositoryException
- if another error occurs.- See Also:
Value.getString()
-
getType
public int getType()
Description copied from interface:Value
Returns thetype
of thisValue
. One of:PropertyType.STRING
PropertyType.DATE
PropertyType.BINARY
PropertyType.DOUBLE
PropertyType.DECIMAL
PropertyType.LONG
PropertyType.BOOLEAN
PropertyType.NAME
PropertyType.PATH
PropertyType.REFERENCE
PropertyType.WEAKREFERENCE
PropertyType.URI
.PropertyType
The type returned is that which was set at property creation.
- Specified by:
getType
in interfaceValue
- Returns:
- an int
- See Also:
Value.getType()
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classObject
- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
- See Also:
Object.hashCode()
-
-