Class AbstractQValueFactory
java.lang.Object
org.apache.jackrabbit.spi.commons.value.AbstractQValueFactory
- All Implemented Interfaces:
QValueFactory
- Direct Known Subclasses:
QValueFactoryImpl
AbstractQValueFactory
...-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionQValue[]
computeAutoValues
(QPropertyDefinition propertyDefinition) Given theQPropertyDefinition
of an autocreated property, compute suitable values to be used in transient space until the newly created node gets saved.create
(boolean value) Create a newQValue
with typePropertyType.BOOLEAN
.create
(double value) Create a newQValue
with typePropertyType.DOUBLE
.create
(long value) Create a newQValue
with typePropertyType.LONG
.Create a newQValue
using the given String representation of the value and itstype
.create
(BigDecimal value) Create a newQValue
with typePropertyType.DECIMAL
.Create a newQValue
with typePropertyType.URI
.Create a newQValue
with typePropertyType.DATE
.Create a newQValue
with typePropertyType.NAME
.Create a newQValue
with typePropertyType.PATH
.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.jackrabbit.spi.QValueFactory
create, create, create
-
Field Details
-
DEFAULT_ENCODING
the default encoding- See Also:
-
-
Constructor Details
-
AbstractQValueFactory
public AbstractQValueFactory()
-
-
Method Details
-
computeAutoValues
public QValue[] computeAutoValues(QPropertyDefinition propertyDefinition) throws RepositoryException Description copied from interface:QValueFactory
Given theQPropertyDefinition
of an autocreated property, compute suitable values to be used in transient space until the newly created node gets saved.- Specified by:
computeAutoValues
in interfaceQValueFactory
- Parameters:
propertyDefinition
- definition of property for which values should be created- Returns:
- computed value
- Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
using the given String representation of the value and itstype
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- String representation of the newQValue
. Note, that the given String must never benull
.type
- A validtype
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- If another error occurs.- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.DATE
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- A non-nullCalendar
object acting as value of the newQValue
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.DOUBLE
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- Adouble
containing the value of the newQValue
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.LONG
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- Along
containing the value of the newQValue
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.BOOLEAN
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- Aboolean
containing the value of the newQValue
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.NAME
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- A non-nullName
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.PATH
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- A non-nullPath
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.URI
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- A non-nullURI
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-
create
Description copied from interface:QValueFactory
Create a newQValue
with typePropertyType.DECIMAL
.- Specified by:
create
in interfaceQValueFactory
- Parameters:
value
- A non-nullBigDecimal
.- Returns:
- a new
QValue
. - Throws:
RepositoryException
- See Also:
-