Class ErrorValue

java.lang.Object
org.apache.jackrabbit.oak.plugins.value.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.
  • Constructor Details

  • Method Details

    • getString

      public String getString() throws RepositoryException
      Description copied from interface: Value
      Returns a String representation of this value.
      Specified by:
      getString in interface Value
      Returns:
      A String representation of the value of this property.
      Throws:
      RepositoryException - if another error occurs.
    • 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.
    • getLong

      public long getLong() throws RepositoryException
      Description copied from interface: Value
      Returns a long representation of this value.
      Specified by:
      getLong in interface Value
      Returns:
      A long representation of this value.
      Throws:
      RepositoryException - if another error occurs.
    • getDouble

      public double getDouble() throws RepositoryException
      Description copied from interface: Value
      Returns a double representation of this value.
      Specified by:
      getDouble in interface Value
      Returns:
      A double representation of this value.
      Throws:
      RepositoryException - if another error occurs.
    • getDecimal

      public BigDecimal getDecimal() throws RepositoryException
      Description copied from interface: Value
      Returns a BigDecimal representation of this value.
      Specified by:
      getDecimal in interface Value
      Returns:
      A BigDecimal representation of this value.
      Throws:
      RepositoryException - if another 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:
      RepositoryException - if another error occurs.
    • getBoolean

      public boolean getBoolean() throws RepositoryException
      Description copied from interface: Value
      Returns a Boolean representation of this value.
      Specified by:
      getBoolean in interface Value
      Returns:
      A Boolean representation of this value.
      Throws:
      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
    • toString

      public String toString()
      Overrides:
      toString in class Object