Class AbstractQValue

  • All Implemented Interfaces:
    java.io.Serializable, QValue
    Direct Known Subclasses:
    DefaultQValue

    public abstract class AbstractQValue
    extends java.lang.Object
    implements QValue, java.io.Serializable
    AbstractQValue...
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void discard()
      Frees temporarily allocated resources such as temporary file, buffer, etc.
      boolean equals​(java.lang.Object obj)
      Default implementation of the equals method.
      javax.jcr.Binary getBinary()
      This implementation creates a binary instance that uses QValue.getStream() and skipping on the given stream as its underlying mechanism to provide random access defined on Binary.
      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.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.
      int hashCode()
      Default calculation of the hashCode.
      java.lang.String toString()
      Returns the string representation of this internal value.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getType

        public int getType()
        Description copied from interface: QValue
        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
        Specified by:
        getType in interface QValue
        Returns:
        the PropertyType of this QValue object.
        See Also:
        QValue.getType()
      • getLength

        public long getLength()
                       throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        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().
        Specified by:
        getLength in interface QValue
        Returns:
        length of this QValue object.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValue.getLength()
      • getName

        public Name getName()
                     throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a Name representation of this value.
        Specified by:
        getName in interface QValue
        Returns:
        A Name representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getName()
      • getCalendar

        public java.util.Calendar getCalendar()
                                       throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a Calendar representation of this value.
        Specified by:
        getCalendar in interface QValue
        Returns:
        A Calendar representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getCalendar()
      • getDecimal

        public java.math.BigDecimal getDecimal()
                                        throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a BigDecimal representation of this value.
        Specified by:
        getDecimal in interface QValue
        Returns:
        A BigDecimal representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getDecimal()
      • getURI

        public java.net.URI getURI()
                            throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns an URI representation of this value.
        Specified by:
        getURI in interface QValue
        Returns:
        A URI representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getURI()
      • getDouble

        public double getDouble()
                         throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a double representation of this value.
        Specified by:
        getDouble in interface QValue
        Returns:
        A double representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getDouble()
      • getLong

        public long getLong()
                     throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a long representation of this value.
        Specified by:
        getLong in interface QValue
        Returns:
        A long representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getLong()
      • getBoolean

        public boolean getBoolean()
                           throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a boolean representation of this value.
        Specified by:
        getBoolean in interface QValue
        Returns:
        A boolean representation of this value.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValue.getBoolean()
      • getPath

        public Path getPath()
                     throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a Path representation of this value.
        Specified by:
        getPath in interface QValue
        Returns:
        A Path representation of this value.
        Throws:
        javax.jcr.RepositoryException - if an error occurs.
        See Also:
        QValue.getPath()
      • getString

        public java.lang.String getString()
                                   throws javax.jcr.RepositoryException
        Description copied from interface: QValue
        Returns a String representation of this QValue object.
        Specified by:
        getString in interface QValue
        Returns:
        A String representation of this QValue object.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValue.getPath()
      • getBinary

        public javax.jcr.Binary getBinary()
                                   throws javax.jcr.RepositoryException
        This implementation creates a binary instance that uses QValue.getStream() and skipping on the given stream as its underlying mechanism to provide random access defined on Binary.
        Specified by:
        getBinary in interface QValue
        Returns:
        A Binary representation of this value.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValue.getBinary()
      • discard

        public void discard()
        Description copied from interface: QValue
        Frees temporarily allocated resources such as temporary file, buffer, etc.
        Specified by:
        discard in interface QValue
        See Also:
        QValue.discard()
      • toString

        public java.lang.String toString()
        Returns the string representation of this internal value.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation of this internal value
      • equals

        public boolean equals​(java.lang.Object obj)
        Default implementation of the equals method. Subclasses may optimize this e.g. by special handling for DATE properties.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj -
        See Also:
        Object.equals(Object)
      • hashCode

        public int hashCode()
        Default calculation of the hashCode. Subclasses may optimize this e.g. by special handling for DATE properties.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashCode of the internal value object.
        See Also:
        Object.hashCode()