Class ErrorValue
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.value.ErrorValue
-
-
Constructor Summary
Constructors Constructor Description ErrorValue(java.lang.Exception exception, int type)
ErrorValue(RepositoryException e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Binary
getBinary()
Returns aBinary
representation of this value.boolean
getBoolean()
Returns aBoolean
representation of this value.java.util.Calendar
getDate()
Returns aCalendar
representation of this value.java.math.BigDecimal
getDecimal()
Returns aBigDecimal
representation of this value.double
getDouble()
Returns adouble
representation of this value.long
getLong()
Returns along
representation of this value.java.io.InputStream
getStream()
Returns anInputStream
representation of this value.java.lang.String
getString()
Returns aString
representation of this value.int
getType()
Returns thetype
of thisValue
.java.lang.String
toString()
-
-
-
Constructor Detail
-
ErrorValue
public ErrorValue(java.lang.Exception exception, int type)
-
ErrorValue
public ErrorValue(RepositoryException e)
-
-
Method Detail
-
getString
public java.lang.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.
-
getStream
public java.io.InputStream getStream() throws 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.
-
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.
-
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.
-
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.
-
getDecimal
public java.math.BigDecimal getDecimal() throws 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.
-
getDate
public java.util.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.
-
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.
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-