Package org.apache.jackrabbit.rmi.value
Class ReferenceValue
- java.lang.Object
-
- org.apache.jackrabbit.rmi.value.ReferenceValue
-
- All Implemented Interfaces:
Serializable
,Value
@Deprecated(forRemoval=true) public class ReferenceValue extends Object
Deprecated, for removal: This API element is subject to removal in a future version.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.The
ReferenceValue
class implements the committed value state for Reference values as a part of the State design pattern (Gof) used by this package.- Since:
- 0.16.4.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReferenceValue(String value)
Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance for the given referencevalue
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object object)
Deprecated, for removal: This API element is subject to removal in a future version.Compares values as defined in the JCR specification.Binary
getBinary()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the binary representation of this value.boolean
getBoolean()
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
.Calendar
getDate()
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
.BigDecimal
getDecimal()
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
.double
getDouble()
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
.long
getLong()
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
.InputStream
getStream()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the stream representation of this value.String
getString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the string representation of the reference value.int
getType()
Deprecated, for removal: This API element is subject to removal in a future version.ReturnsPropertyType.REFERENCE
.protected ValueFormatException
getValueFormatException(String destType)
Deprecated, for removal: This API element is subject to removal in a future version.Returns aValueFormatException
with a message indicating what kind of type conversion is not supported.int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code that's in line with how theObject.equals(Object)
method is implemented.String
toString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this value.
-
-
-
Constructor Detail
-
ReferenceValue
protected ReferenceValue(String value) throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance for the given referencevalue
.- Throws:
ValueFormatException
-
-
Method Detail
-
getType
public int getType()
Deprecated, for removal: This API element is subject to removal in a future version.ReturnsPropertyType.REFERENCE
.
-
getString
public String getString() throws ValueFormatException, RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Returns the string representation of the reference value.
-
getStream
public final InputStream getStream() throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Returns the stream representation of this value. This method implements the deprecated JCR 1.0 behaviour of always returning the same stream instance. The stream is retrieved from aBinary
instance returned byValue.getBinary()
.- Specified by:
getStream
in interfaceValue
- Returns:
- stream representation of this value
- Throws:
RepositoryException
- if the stream can not be created
-
getBinary
public Binary getBinary() throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Returns the binary representation of this value. The default implementation uses the UTF-8 serialization of the string returned byValue.getString()
. Subclasses- Specified by:
getBinary
in interfaceValue
- Throws:
RepositoryException
-
getBoolean
public boolean getBoolean() throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
. Implementations should overwrite if conversion to boolean is supported.- Specified by:
getBoolean
in interfaceValue
- Returns:
- nothing
- Throws:
ValueFormatException
- If the value cannot be converted to a boolean.
-
getDate
public Calendar getDate() throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
. Implementations should overwrite if conversion toCalender
is supported.- Specified by:
getDate
in interfaceValue
- Returns:
- nothing
- Throws:
ValueFormatException
- If the value cannot be converted to aCalendar
instance.
-
getDecimal
public BigDecimal getDecimal() throws RepositoryException
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
. Implementations should overwrite if conversion to aBigDecimal
is supported.- Specified by:
getDecimal
in interfaceValue
- Returns:
- nothing
- Throws:
ValueFormatException
- If the value cannot be converted to aBigDecimal
.RepositoryException
-
getDouble
public double getDouble() throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
. Implementations should overwrite if conversion to double is supported.- Specified by:
getDouble
in interfaceValue
- Returns:
- nothing
- Throws:
ValueFormatException
- If the value cannot be converted to a double.
-
getLong
public long getLong() throws ValueFormatException
Deprecated, for removal: This API element is subject to removal in a future version.Always throws aValueFormatException
. Implementations should overwrite if conversion to long is supported.- Specified by:
getLong
in interfaceValue
- Returns:
- nothing
- Throws:
ValueFormatException
- If the value cannot be converted to a long.
-
getValueFormatException
protected ValueFormatException getValueFormatException(String destType)
Deprecated, for removal: This API element is subject to removal in a future version.Returns aValueFormatException
with a message indicating what kind of type conversion is not supported.- Parameters:
destType
- The name of the value type to which this value cannot be converted.- Returns:
- nothing
-
equals
public boolean equals(Object object)
Deprecated, for removal: This API element is subject to removal in a future version.Compares values as defined in the JCR specification.
-
hashCode
public int hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code that's in line with how theObject.equals(Object)
method is implemented.
-
-