Class NameValue

  • All Implemented Interfaces:
    Serializable, Value

    @Deprecated
    public class NameValue
    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 NameValue class implements the committed value state for Name values as a part of the State design pattern (Gof) used by this package.

    Since:
    0.16.4.1
    See Also:
    Serialized Form
    • Method Detail

      • getType

        public int getType()
        Deprecated.
        Returns PropertyType.NAME.
      • 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 a Binary instance returned by Value.getBinary().
        Specified by:
        getStream in interface Value
        Returns:
        stream representation of this value
        Throws:
        RepositoryException - if the stream can not be created
      • getBoolean

        public boolean getBoolean()
                           throws ValueFormatException
        Deprecated.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to boolean is supported.
        Specified by:
        getBoolean in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a boolean.
      • getDate

        public Calendar getDate()
                         throws ValueFormatException
        Deprecated.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to Calender is supported.
        Specified by:
        getDate in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a Calendar instance.
      • getDouble

        public double getDouble()
                         throws ValueFormatException
        Deprecated.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to double is supported.
        Specified by:
        getDouble in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a double.
      • getLong

        public long getLong()
                     throws ValueFormatException
        Deprecated.
        Always throws a ValueFormatException. Implementations should overwrite if conversion to long is supported.
        Specified by:
        getLong in interface Value
        Returns:
        nothing
        Throws:
        ValueFormatException - If the value cannot be converted to a long.
      • getValueFormatException

        protected ValueFormatException getValueFormatException​(String destType)
        Deprecated.
        Returns a ValueFormatException 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.
        Compares values as defined in the JCR specification.
        Overrides:
        equals in class Object
        Parameters:
        object - value for comparison
        Returns:
        true if the values are equal, false otherwise
        See Also:
        JCRRMI-16
      • hashCode

        public int hashCode()
        Deprecated.
        Returns a hash code that's in line with how the Object.equals(Object) method is implemented.
        Overrides:
        hashCode in class Object
        Returns:
        hash code of this value
      • toString

        public String toString()
        Deprecated.
        Returns a string representation of this value.
        Overrides:
        toString in class Object
        Returns:
        value string