Class AbstractQValueFactory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DEFAULT_ENCODING
      the default encoding
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      QValue[] computeAutoValues​(QPropertyDefinition propertyDefinition)
      Given the QPropertyDefinition of an autocreated property, compute suitable values to be used in transient space until the newly created node gets saved.
      QValue create​(boolean value)
      Create a new QValue with type PropertyType.BOOLEAN.
      QValue create​(double value)
      Create a new QValue with type PropertyType.DOUBLE.
      QValue create​(long value)
      Create a new QValue with type PropertyType.LONG.
      QValue create​(java.lang.String value, int type)
      Create a new QValue using the given String representation of the value and its type.
      QValue create​(java.math.BigDecimal value)
      Create a new QValue with type PropertyType.DECIMAL.
      QValue create​(java.net.URI value)
      Create a new QValue with type PropertyType.URI.
      QValue create​(java.util.Calendar value)
      Create a new QValue with type PropertyType.DATE.
      QValue create​(Name value)
      Create a new QValue with type PropertyType.NAME.
      QValue create​(Path value)
      Create a new QValue with type PropertyType.PATH.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_ENCODING

        public static final java.lang.String DEFAULT_ENCODING
        the default encoding
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractQValueFactory

        public AbstractQValueFactory()
    • Method Detail

      • create

        public QValue create​(java.lang.String value,
                             int type)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue using the given String representation of the value and its type.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - String representation of the new QValue. Note, that the given String must never be null.
        type - A valid type.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.ValueFormatException - If the given value cannot be converted to the specified type.
        javax.jcr.RepositoryException - If another error occurs.
        See Also:
        QValueFactory.create(String, int)
      • create

        public QValue create​(java.util.Calendar value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.DATE.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A non-null Calendar object acting as value of the new QValue.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(Calendar)
      • create

        public QValue create​(double value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.DOUBLE.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A double containing the value of the new QValue.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(double)
      • create

        public QValue create​(long value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.LONG.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A long containing the value of the new QValue.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(long)
      • create

        public QValue create​(boolean value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.BOOLEAN.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A boolean containing the value of the new QValue.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(boolean)
      • create

        public QValue create​(Name value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.NAME.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A non-null Name.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(Name)
      • create

        public QValue create​(Path value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.PATH.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A non-null Path.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(Path)
      • create

        public QValue create​(java.net.URI value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.URI.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A non-null URI.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(URI)
      • create

        public QValue create​(java.math.BigDecimal value)
                      throws javax.jcr.RepositoryException
        Description copied from interface: QValueFactory
        Create a new QValue with type PropertyType.DECIMAL.
        Specified by:
        create in interface QValueFactory
        Parameters:
        value - A non-null BigDecimal.
        Returns:
        a new QValue.
        Throws:
        javax.jcr.RepositoryException
        See Also:
        QValueFactory.create(URI)