Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


oracle.ocs.jcr
Interface OracleValueFactory

All Superinterfaces:
javax.jcr.ValueFactory

public interface OracleValueFactory
extends javax.jcr.ValueFactory

The ValueFactory object provides methods for the creation Value objects that can then be used to set properties.


Method Summary
 javax.jcr.Value createValue(boolean value)
          Returns a Value object ofjavax.jcr.PropertyType#BOOLEAN with the specified value.
 javax.jcr.Value createValue(java.util.Calendar value)
          Returns a Value object ofjavax.jcr.PropertyType#DATE with the specified value.
 javax.jcr.Value createValue(double value)
          Returns a Value object ofjavax.jcr.PropertyType#DOUBLE with the specified value.
 javax.jcr.Value createValue(java.io.InputStream value)
          Returns a Value object of OraclePropertyType.BINARY with a value consisting of the content of the specified InputStream.
 javax.jcr.Value createValue(long value)
          Returns a Value object ofjavax.jcr.PropertyType#LONG with the specified value.
 javax.jcr.Value createValue(javax.jcr.Node value)
          Returns a Value object ofjavax.jcr.PropertyType#REFERENCE that holds the UUID of the specified Node.
 javax.jcr.Value createValue(java.lang.String value)
          Returns a Value object of javax.jcr.PropertyType#STRING with the specified value.
 javax.jcr.Value createValue(java.lang.String value, int type)
          Returns a Value object of the javax.jcr.PropertyType specified by type with the specified value.

 

Method Detail

createValue

javax.jcr.Value createValue(java.lang.String value)
Returns a Value object of javax.jcr.PropertyType#STRING with the specified value.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a String
Returns:
a Value of javax.jcr.PropertyType#STRING

createValue

javax.jcr.Value createValue(java.lang.String value,
                            int type)
                            throws javax.jcr.ValueFormatException
Returns a Value object of the javax.jcr.PropertyType specified by type with the specified value. A ValueFormatException is thrown if the specified value cannot be converted to the specified type.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a String
type - one of the constants defined in javax.jcr.PropertyType.
Returns:
a Value of javax.jcr.PropertyType type.
Throws:
javax.jcr.ValueFormatException - if the specified value cannot be converted to the specified type.

createValue

javax.jcr.Value createValue(long value)
Returns a Value object ofjavax.jcr.PropertyType#LONG with the specified value.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a long
Returns:
a Value of javax.jcr.PropertyType#LONG

createValue

javax.jcr.Value createValue(double value)
Returns a Value object ofjavax.jcr.PropertyType#DOUBLE with the specified value.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a double
Returns:
a Value ofjavax.jcr.PropertyType#DOUBLE

createValue

javax.jcr.Value createValue(boolean value)
Returns a Value object ofjavax.jcr.PropertyType#BOOLEAN with the specified value.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a boolean
Returns:
a Value ofjavax.jcr.PropertyType#BOOLEAN

createValue

javax.jcr.Value createValue(java.util.Calendar value)
Returns a Value object ofjavax.jcr.PropertyType#DATE with the specified value.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a Calendar
Returns:
a Value ofjavax.jcr.PropertyType#DATE

createValue

javax.jcr.Value createValue(java.io.InputStream value)
Returns a Value object of OraclePropertyType.BINARY with a value consisting of the content of the specified InputStream.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - an InputStream
Returns:
a Value ofjavax.jcr.PropertyType#BINARY

createValue

javax.jcr.Value createValue(javax.jcr.Node value)
                            throws javax.jcr.RepositoryException
Returns a Value object ofjavax.jcr.PropertyType#REFERENCE that holds the UUID of the specified Node. This Value object can then be used to set a property that will be a reference to that Node.<p/> <p/> A RepositoryException is thrown if the specified Node is not referenceable, the current Session is no longer active, or another error occurs.
Specified by:
createValue in interface javax.jcr.ValueFactory
Parameters:
value - a Node
Returns:
a Value ofjavax.jcr.PropertyType#REFERENCE
Throws:
javax.jcr.RepositoryException - if the specified Node is not referenceable, the current Session is no longer active, or another error occurs.

Skip navigation links

Oracle Beehive Java Content Repository Java API Reference
Release 1 (1.3)

E11993-02


Copyright © 2007, 2008, Oracle. All rights reserved.