public interface QValueFactory
QValueFactory defines methods to create QValue
instances.| Modifier and Type | Method and 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(BigDecimal value)
Create a new
QValue with type PropertyType.DECIMAL. |
QValue |
create(boolean value)
Create a new
QValue with type PropertyType.BOOLEAN. |
QValue |
create(byte[] value)
Create a new
QValue with type PropertyType.BINARY. |
QValue |
create(Calendar value)
Create a new
QValue with type PropertyType.DATE. |
QValue |
create(double value)
Create a new
QValue with type PropertyType.DOUBLE. |
QValue |
create(File value)
Create a new
QValue with type PropertyType.BINARY. |
QValue |
create(InputStream value)
Creates a QValue that contains the given binary stream.
|
QValue |
create(long value)
Create a new
QValue with type PropertyType.LONG. |
QValue |
create(Name value)
Create a new
QValue with type PropertyType.NAME. |
QValue |
create(Path value)
Create a new
QValue with type PropertyType.PATH. |
QValue |
create(String value,
int type)
Create a new
QValue using the given String representation
of the value and its type. |
QValue |
create(URI value)
Create a new
QValue with type PropertyType.URI. |
QValue create(String value, int type) throws javax.jcr.ValueFormatException, javax.jcr.RepositoryException
QValue using the given String representation
of the value and its type.value - String representation of the new QValue. Note,
that the given String must never be null.type - A valid type.QValue.javax.jcr.ValueFormatException - If the given value cannot be
converted to the specified type.javax.jcr.RepositoryException - If another error occurs.QValue.getType()QValue create(Calendar value) throws javax.jcr.RepositoryException
QValue with type PropertyType.DATE.value - A non-null Calendar object acting as value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValue create(double value) throws javax.jcr.RepositoryException
QValue with type PropertyType.DOUBLE.value - A double containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValue create(long value) throws javax.jcr.RepositoryException
QValue with type PropertyType.LONG.value - A long containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValue create(boolean value) throws javax.jcr.RepositoryException
QValue with type PropertyType.BOOLEAN.value - A boolean containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValue create(Name value) throws javax.jcr.RepositoryException
QValue with type PropertyType.NAME.value - A non-null Name.QValue.javax.jcr.RepositoryExceptionQValue create(Path value) throws javax.jcr.RepositoryException
QValue with type PropertyType.PATH.value - A non-null Path.QValue.javax.jcr.RepositoryExceptionQValue create(BigDecimal value) throws javax.jcr.RepositoryException
QValue with type PropertyType.DECIMAL.value - A non-null BigDecimal.QValue.javax.jcr.RepositoryExceptionQValue create(URI value) throws javax.jcr.RepositoryException
QValue with type PropertyType.URI.value - A non-null URI.QValue.javax.jcr.RepositoryExceptionQValue create(byte[] value) throws javax.jcr.RepositoryException
QValue with type PropertyType.BINARY.value - QValue.javax.jcr.RepositoryExceptionQValue create(InputStream value) throws javax.jcr.RepositoryException, IOException
PropertyType.BINARY.value - binary streamQValue.javax.jcr.RepositoryException - if the value could not be createdIOException - if the stream can not be consumedQValue create(File value) throws javax.jcr.RepositoryException, IOException
QValue with type PropertyType.BINARY.value - QValue.IOExceptionjavax.jcr.RepositoryExceptionQValue[] computeAutoValues(QPropertyDefinition propertyDefinition) throws javax.jcr.RepositoryException
QPropertyDefinition of an autocreated
property, compute suitable values to be used in transient space until
the newly created node gets saved.propertyDefinition - definition of property for which values should be createdjavax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.