Package org.apache.jackrabbit.rmi.value
Class ReferenceValue
- java.lang.Object
-
- org.apache.jackrabbit.rmi.value.ReferenceValue
-
- All Implemented Interfaces:
Serializable,Value
@Deprecated public class ReferenceValue extends Object
Deprecated.RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.The
ReferenceValueclass 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 protectedReferenceValue(String value)Deprecated.Creates an instance for the given referencevalue.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object object)Deprecated.Compares values as defined in the JCR specification.BinarygetBinary()Deprecated.Returns the binary representation of this value.booleangetBoolean()Deprecated.Always throws aValueFormatException.CalendargetDate()Deprecated.Always throws aValueFormatException.BigDecimalgetDecimal()Deprecated.Always throws aValueFormatException.doublegetDouble()Deprecated.Always throws aValueFormatException.longgetLong()Deprecated.Always throws aValueFormatException.InputStreamgetStream()Deprecated.Returns the stream representation of this value.StringgetString()Deprecated.Returns the string representation of the reference value.intgetType()Deprecated.ReturnsPropertyType.REFERENCE.protected ValueFormatExceptiongetValueFormatException(String destType)Deprecated.Returns aValueFormatExceptionwith a message indicating what kind of type conversion is not supported.inthashCode()Deprecated.Returns a hash code that's in line with how theObject.equals(Object)method is implemented.StringtoString()Deprecated.Returns a string representation of this value.
-
-
-
Constructor Detail
-
ReferenceValue
protected ReferenceValue(String value) throws ValueFormatException
Deprecated.Creates an instance for the given referencevalue.- Throws:
ValueFormatException
-
-
Method Detail
-
getType
public int getType()
Deprecated.ReturnsPropertyType.REFERENCE.
-
getString
public String getString() throws ValueFormatException, RepositoryException
Deprecated.Returns the string representation of the reference value.
-
getStream
public final InputStream getStream() throws RepositoryException
Deprecated.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 aBinaryinstance returned byValue.getBinary().- Specified by:
getStreamin interfaceValue- Returns:
- stream representation of this value
- Throws:
RepositoryException- if the stream can not be created
-
getBinary
public Binary getBinary() throws RepositoryException
Deprecated.Returns the binary representation of this value. The default implementation uses the UTF-8 serialization of the string returned byValue.getString(). Subclasses- Specified by:
getBinaryin interfaceValue- Throws:
RepositoryException
-
getBoolean
public boolean getBoolean() throws ValueFormatExceptionDeprecated.Always throws aValueFormatException. Implementations should overwrite if conversion to boolean is supported.- Specified by:
getBooleanin interfaceValue- Returns:
- nothing
- Throws:
ValueFormatException- If the value cannot be converted to a boolean.
-
getDate
public Calendar getDate() throws ValueFormatException
Deprecated.Always throws aValueFormatException. Implementations should overwrite if conversion toCalenderis supported.- Specified by:
getDatein interfaceValue- Returns:
- nothing
- Throws:
ValueFormatException- If the value cannot be converted to aCalendarinstance.
-
getDecimal
public BigDecimal getDecimal() throws RepositoryException
Deprecated.Always throws aValueFormatException. Implementations should overwrite if conversion to aBigDecimalis supported.- Specified by:
getDecimalin interfaceValue- Returns:
- nothing
- Throws:
ValueFormatException- If the value cannot be converted to aBigDecimal.RepositoryException
-
getDouble
public double getDouble() throws ValueFormatExceptionDeprecated.Always throws aValueFormatException. Implementations should overwrite if conversion to double is supported.- Specified by:
getDoublein interfaceValue- Returns:
- nothing
- Throws:
ValueFormatException- If the value cannot be converted to a double.
-
getLong
public long getLong() throws ValueFormatExceptionDeprecated.Always throws aValueFormatException. Implementations should overwrite if conversion to long is supported.- Specified by:
getLongin interfaceValue- Returns:
- nothing
- Throws:
ValueFormatException- If the value cannot be converted to a long.
-
getValueFormatException
protected ValueFormatException getValueFormatException(String destType)
Deprecated.Returns aValueFormatExceptionwith 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.Compares values as defined in the JCR specification.
-
hashCode
public int hashCode()
Deprecated.Returns a hash code that's in line with how theObject.equals(Object)method is implemented.
-
-