Class ErrorValue

  • All Implemented Interfaces:
    Value

    public class ErrorValue
    extends Object
    implements Value
    Instances of this class represent a Value which couldn't be retrieved. All its accessors throw a RepositoryException.
    • Method Detail

      • getStream

        public InputStream getStream()
                              throws RepositoryException
        Description copied from interface: Value
        Returns an InputStream 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 interface Value
        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 a Binary representation of this value. The Binary object in turn provides methods to access the binary data itself. Uses the standard conversion to binary (see JCR specification).
        Specified by:
        getBinary in interface Value
        Returns:
        A Binary representation of this value.
        Throws:
        RepositoryException - if an error occurs.
      • getDate

        public Calendar getDate()
                         throws RepositoryException
        Description copied from interface: Value
        Returns a Calendar 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 interface Value
        Returns:
        A Calendar representation of this value.
        Throws:
        ValueFormatException - if conversion to a Calendar is not possible.
        RepositoryException - if another error occurs.
      • getType

        public int getType()
        Description copied from interface: Value
        Returns the type of this Value. 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
        See PropertyType.

        The type returned is that which was set at property creation.

        Specified by:
        getType in interface Value
        Returns:
        an int