Interface QValue

  • All Known Implementing Classes:
    AbstractQValue, DefaultQValue

    public interface QValue
    QValue is the SPI representation of a jcr value. It therefore refers to Names and Paths only and is thus isolated from session-specific namespace mappings.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static QValue[] EMPTY_ARRAY  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void discard()
      Frees temporarily allocated resources such as temporary file, buffer, etc.
      javax.jcr.Binary getBinary()
      Returns a Binary representation of this QValue object.
      boolean getBoolean()
      Returns a boolean representation of this value.
      java.util.Calendar getCalendar()
      Returns a Calendar representation of this value.
      java.math.BigDecimal getDecimal()
      Returns a BigDecimal representation of this value.
      double getDouble()
      Returns a double representation of this value.
      long getLength()
      Returns the length of the internal value or -1 if the implementation cannot determine the length at this time.
      NOTE: for PropertyType.NAME and PropertyType.PATH the length of the internal value must not be used for indicating the length of a property such as retrieved by calling Property.getLength() and Property.getLengths().
      long getLong()
      Returns a long representation of this value.
      Name getName()
      Returns a Name representation of this value.
      Path getPath()
      Returns a Path representation of this value.
      java.io.InputStream getStream()
      Returns an InputStream representation of this QValue object.
      java.lang.String getString()
      Returns a String representation of this QValue object.
      int getType()
      Returns the PropertyType of this QValue object.
      java.net.URI getURI()
      Returns an URI representation of this value.
    • Field Detail

      • EMPTY_ARRAY

        static final QValue[] EMPTY_ARRAY
    • Method Detail

      • getType

        int getType()
        Returns the PropertyType of this QValue object. It may be either of the value property types defined by the JSR 283:
        • PropertyType.STRING
        • PropertyType.BINARY
        • PropertyType.BOOLEAN
        • PropertyType.DATE
        • PropertyType.DECIMAL
        • PropertyType.DOUBLE
        • PropertyType.LONG
        • PropertyType.NAME
        • PropertyType.PATH
        • PropertyType.REFERENCE
        • PropertyType.URI
        • PropertyType.WEAKREFERENCE
        Returns:
        the PropertyType of this QValue object.
      • getLength

        long getLength()
                throws javax.jcr.RepositoryException
        Returns the length of the internal value or -1 if the implementation cannot determine the length at this time.
        NOTE: for PropertyType.NAME and PropertyType.PATH the length of the internal value must not be used for indicating the length of a property such as retrieved by calling Property.getLength() and Property.getLengths().
        Returns:
        length of this QValue object.
        Throws:
        javax.jcr.RepositoryException
      • getString

        java.lang.String getString()
                            throws javax.jcr.RepositoryException
        Returns a String representation of this QValue object.
        Returns:
        A String representation of this QValue object.
        Throws:
        javax.jcr.RepositoryException
      • getStream

        java.io.InputStream getStream()
                               throws javax.jcr.RepositoryException
        Returns an InputStream representation of this QValue object. This method always returns a new stream.
        Returns:
        A stream representation of this value.
        Throws:
        javax.jcr.RepositoryException
      • getBinary

        javax.jcr.Binary getBinary()
                            throws javax.jcr.RepositoryException
        Returns a Binary representation of this QValue object.
        Returns:
        A Binary representation of this value.
        Throws:
        javax.jcr.RepositoryException
      • getCalendar

        java.util.Calendar getCalendar()
                                throws javax.jcr.RepositoryException
        Returns a Calendar representation of this value.
        Returns:
        A Calendar representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getDecimal

        java.math.BigDecimal getDecimal()
                                 throws javax.jcr.RepositoryException
        Returns a BigDecimal representation of this value.
        Returns:
        A BigDecimal representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getDouble

        double getDouble()
                  throws javax.jcr.RepositoryException
        Returns a double representation of this value.
        Returns:
        A double representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getLong

        long getLong()
              throws javax.jcr.RepositoryException
        Returns a long representation of this value.
        Returns:
        A long representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getBoolean

        boolean getBoolean()
                    throws javax.jcr.RepositoryException
        Returns a boolean representation of this value.
        Returns:
        A boolean representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getName

        Name getName()
              throws javax.jcr.RepositoryException
        Returns a Name representation of this value.
        Returns:
        A Name representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getPath

        Path getPath()
              throws javax.jcr.RepositoryException
        Returns a Path representation of this value.
        Returns:
        A Path representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • getURI

        java.net.URI getURI()
                     throws javax.jcr.RepositoryException
        Returns an URI representation of this value.
        Returns:
        A URI representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
      • discard

        void discard()
        Frees temporarily allocated resources such as temporary file, buffer, etc.