public class QValueFactoryLogger extends AbstractLogger implements QValueFactory
QValueFactory
.AbstractLogger.Callable, AbstractLogger.SafeCallable
writer
Constructor and Description |
---|
QValueFactoryLogger(QValueFactory qValueFactory,
LogWriter writer)
Create a new instance for the given
qValueFactory which uses
writer for persisting log messages. |
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 . |
QValueFactory |
getQValueFactory() |
execute, execute
public QValueFactoryLogger(QValueFactory qValueFactory, LogWriter writer)
qValueFactory
which uses
writer
for persisting log messages.qValueFactory
- writer
- public QValueFactory getQValueFactory()
public QValue create(String value, int type) throws RepositoryException
QValueFactory
QValue
using the given String representation
of the value and its type
.create
in interface QValueFactory
value
- String representation of the new QValue
. Note,
that the given String must never be null
.type
- A valid type
.QValue
.ValueFormatException
- If the given value
cannot be
converted to the specified type
.RepositoryException
- If another error occurs.QValue.getType()
public QValue create(Calendar value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.DATE
.create
in interface QValueFactory
value
- A non-null Calendar
object acting as value
of the new QValue
.QValue
.RepositoryException
public QValue create(double value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.DOUBLE
.create
in interface QValueFactory
value
- A double
containing the value
of the new QValue
.QValue
.RepositoryException
public QValue create(long value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.LONG
.create
in interface QValueFactory
value
- A long
containing the value
of the new QValue
.QValue
.RepositoryException
public QValue create(boolean value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.BOOLEAN
.create
in interface QValueFactory
value
- A boolean
containing the value
of the new QValue
.QValue
.RepositoryException
public QValue create(Name value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.NAME
.create
in interface QValueFactory
value
- A non-null Name
.QValue
.RepositoryException
public QValue create(Path value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.PATH
.create
in interface QValueFactory
value
- A non-null Path
.QValue
.RepositoryException
public QValue create(URI value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.URI
.create
in interface QValueFactory
value
- A non-null URI
.QValue
.RepositoryException
public QValue create(BigDecimal value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.DECIMAL
.create
in interface QValueFactory
value
- A non-null BigDecimal
.QValue
.RepositoryException
public QValue create(byte[] value) throws RepositoryException
QValueFactory
QValue
with type PropertyType.BINARY
.create
in interface QValueFactory
QValue
.RepositoryException
public QValue create(InputStream value) throws RepositoryException, IOException
QValueFactory
PropertyType.BINARY
.create
in interface QValueFactory
value
- binary streamQValue
.RepositoryException
- if the value could not be createdIOException
- if the stream can not be consumedpublic QValue create(File value) throws RepositoryException, IOException
QValueFactory
QValue
with type PropertyType.BINARY
.create
in interface QValueFactory
QValue
.IOException
RepositoryException
public QValue[] computeAutoValues(QPropertyDefinition propertyDefinition) throws RepositoryException
QValueFactory
QPropertyDefinition
of an autocreated
property, compute suitable values to be used in transient space until
the newly created node gets saved.computeAutoValues
in interface QValueFactory
propertyDefinition
- definition of property for which values should be createdRepositoryException
Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.