public class JcrValueFactory extends Object implements ValueFactory
ValueFactory implementation for ModeShape.| Modifier | Constructor and Description |
|---|---|
protected |
JcrValueFactory(ExecutionContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertValueToType(Object value,
int toType) |
BinaryValue |
createBinary(byte[] value)
Creates a JCR
Binary value from the given byte array. |
BinaryValue |
createBinary(InputStream value) |
BinaryValue |
createBinary(InputStream value,
String hint)
Creates a JCR
Binary value from the given input stream
with a hint to the factory (which is passed to the storage layer) |
String |
createName(String localName)
Creates a JCR compliant name string, from the given local name.
|
String |
createName(String namespaceUri,
String localName)
Creates a JCR compliant name string, from the given namespace uri and local name.
|
org.modeshape.jcr.JcrValue |
createSimpleReference(Node node)
Returns a
Value object of PropertyType.SIMPLE_REFERENCE that holds the identifier of the specified Node. |
org.modeshape.jcr.JcrValue |
createValue(BigDecimal value) |
org.modeshape.jcr.JcrValue |
createValue(Binary value) |
org.modeshape.jcr.JcrValue |
createValue(boolean value) |
org.modeshape.jcr.JcrValue |
createValue(Calendar value) |
org.modeshape.jcr.JcrValue |
createValue(Date value)
|
org.modeshape.jcr.JcrValue |
createValue(double value) |
org.modeshape.jcr.JcrValue |
createValue(InputStream value) |
org.modeshape.jcr.JcrValue |
createValue(long value) |
org.modeshape.jcr.JcrValue |
createValue(Node value) |
org.modeshape.jcr.JcrValue |
createValue(Node value,
boolean weak) |
org.modeshape.jcr.JcrValue |
createValue(Object value,
int propertyType) |
org.modeshape.jcr.JcrValue |
createValue(Reference value) |
org.modeshape.jcr.JcrValue |
createValue(String value) |
org.modeshape.jcr.JcrValue |
createValue(String value,
int propertyType) |
org.modeshape.jcr.JcrValue[] |
createValues(List<?> values,
int propertyType) |
protected ValueFactory<?> |
valueFactoryFor(int jcrPropertyType) |
protected JcrValueFactory(ExecutionContext context)
public org.modeshape.jcr.JcrValue[] createValues(List<?> values, int propertyType) throws ValueFormatException
ValueFormatExceptionpublic org.modeshape.jcr.JcrValue createValue(String value, int propertyType) throws ValueFormatException
createValue in interface ValueFactoryValueFormatExceptionpublic org.modeshape.jcr.JcrValue createValue(Object value, int propertyType) throws ValueFormatException
ValueFormatExceptionpublic org.modeshape.jcr.JcrValue createValue(Node value) throws RepositoryException
createValue in interface ValueFactoryRepositoryExceptionpublic org.modeshape.jcr.JcrValue createValue(Node value, boolean weak) throws RepositoryException
createValue in interface ValueFactoryRepositoryExceptionpublic org.modeshape.jcr.JcrValue createValue(Binary value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(InputStream value)
createValue in interface ValueFactorypublic BinaryValue createBinary(InputStream value)
createBinary in interface ValueFactorypublic BinaryValue createBinary(InputStream value, String hint)
ValueFactoryBinary value from the given input stream
with a hint to the factory (which is passed to the storage layer)value - a non-null input streamhint - a hint that the storage layer may use to make persistence decisionspublic org.modeshape.jcr.JcrValue createValue(Calendar value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(boolean value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(double value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(long value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(String value)
createValue in interface ValueFactorypublic org.modeshape.jcr.JcrValue createValue(BigDecimal value)
createValue in interface ValueFactorypublic BinaryValue createBinary(byte[] value)
ValueFactoryBinary value from the given byte array.value - a non-null byte arraypublic org.modeshape.jcr.JcrValue createValue(Date value)
ValueFactoryvalue - a non-null date instancepublic org.modeshape.jcr.JcrValue createValue(Reference value)
public String createName(String localName)
ValueFactorylocalName - a non-null string.public String createName(String namespaceUri, String localName)
ValueFactorynamespaceUri - a non-null string.localName - a non-null string.public org.modeshape.jcr.JcrValue createSimpleReference(Node node) throws RepositoryException
ValueFactoryValue object of PropertyType.SIMPLE_REFERENCE that holds the identifier of the specified Node.
This Value object can then be used to set a property that will be a reference to that Node.node - a NodeValue of PropertyType.SIMPLE_REFERENCERepositoryException - if an error occurs.protected ValueFactory<?> valueFactoryFor(int jcrPropertyType)
protected Object convertValueToType(Object value, int toType) throws ValueFormatException
ValueFormatExceptionCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.