public abstract class AbstractQValueFactory extends Object implements QValueFactory
AbstractQValueFactory...| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ENCODING
the default encoding
|
protected static NameFactory |
NAME_FACTORY |
protected static PathFactory |
PATH_FACTORY |
| Constructor and Description |
|---|
AbstractQValueFactory() |
| 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(Calendar value)
Create a new
QValue with type PropertyType.DATE. |
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(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. |
protected QValue |
createReference(String ref,
boolean weak)
Creates a new QValue of type REFERENCE or WEAKREFERENCE.
|
protected QValue |
createString(String value)
Creates a new QValue of type STRING.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createpublic static final String DEFAULT_ENCODING
protected static final PathFactory PATH_FACTORY
protected static final NameFactory NAME_FACTORY
public QValue[] computeAutoValues(QPropertyDefinition propertyDefinition) throws javax.jcr.RepositoryException
QValueFactoryQPropertyDefinition of an autocreated
property, compute suitable values to be used in transient space until
the newly created node gets saved.computeAutoValues in interface QValueFactorypropertyDefinition - definition of property for which values should be createdjavax.jcr.RepositoryExceptionQValueFactory.computeAutoValues(org.apache.jackrabbit.spi.QPropertyDefinition)public QValue create(String value, int type) throws javax.jcr.RepositoryException
QValueFactoryQValue using the given String representation
of the value and its type.create in interface QValueFactoryvalue - 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.QValueFactory.create(String, int)public QValue create(Calendar value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.DATE.create in interface QValueFactoryvalue - A non-null Calendar object acting as value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(Calendar)public QValue create(double value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.DOUBLE.create in interface QValueFactoryvalue - A double containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(double)public QValue create(long value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.LONG.create in interface QValueFactoryvalue - A long containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(long)public QValue create(boolean value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.BOOLEAN.create in interface QValueFactoryvalue - A boolean containing the value
of the new QValue.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(boolean)public QValue create(Name value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.NAME.create in interface QValueFactoryvalue - A non-null Name.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(Name)public QValue create(Path value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.PATH.create in interface QValueFactoryvalue - A non-null Path.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(Path)public QValue create(URI value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.URI.create in interface QValueFactoryvalue - A non-null URI.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(URI)public QValue create(BigDecimal value) throws javax.jcr.RepositoryException
QValueFactoryQValue with type PropertyType.DECIMAL.create in interface QValueFactoryvalue - A non-null BigDecimal.QValue.javax.jcr.RepositoryExceptionQValueFactory.create(URI)protected QValue createString(String value)
value - the string value.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.