Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.jcr
Class JcrValueFactory

    java.lang.Object
      org.modeshape.jcr.JcrValueFactory

All Implemented Interfaces:
  ValueFactory

    public class JcrValueFactory

extends Object
implements ValueFactory

The `ValueFactory` implementation for ModeShape.

Constructor Summary
`protected` | `JcrValueFactory(ExecutionContext context)`

Method Summary
`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)`
`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` | `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)` Creates a JCR compatible `Value` from a `Date` instance.
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JcrValueFactory

    protected JcrValueFactory(ExecutionContext context)

Method Detail

### createValues

    public org.modeshape.jcr.JcrValue[] createValues(List<?> values,
                                                     int propertyType)
                                              throws ValueFormatException

  Throws:
    `ValueFormatException`

### createValue

    public org.modeshape.jcr.JcrValue createValue(String value,
                                                  int propertyType)
                                           throws ValueFormatException

  Specified by:
    `createValue` in interface `ValueFactory`
  Throws:
    `ValueFormatException`

### createValue

    public org.modeshape.jcr.JcrValue createValue(Object value,
                                                  int propertyType)
                                           throws ValueFormatException

  Throws:
    `ValueFormatException`

### createValue

    public org.modeshape.jcr.JcrValue createValue(Node value)
                                           throws RepositoryException

  Specified by:
    `createValue` in interface `ValueFactory`
  Throws:
    `RepositoryException`

### createValue

    public org.modeshape.jcr.JcrValue createValue(Node value,
                                                  boolean weak)
                                           throws RepositoryException

  Specified by:
    `createValue` in interface `ValueFactory`
  Throws:
    `RepositoryException`

### createValue

    public org.modeshape.jcr.JcrValue createValue(Binary value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(InputStream value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createBinary

    public BinaryValue createBinary(InputStream value)

  Specified by:
    `createBinary` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(Calendar value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(boolean value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(double value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(long value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(String value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createValue

    public org.modeshape.jcr.JcrValue createValue(BigDecimal value)

  Specified by:
    `createValue` in interface `ValueFactory`

### createBinary

    public BinaryValue createBinary(byte[] value)

  Description copied from interface: `ValueFactory`
  Creates a JCR `Binary` value from the given byte array.

  Parameters:
    `value` - a non-null byte array
  Returns:
    a Binary implementation instance

### createValue

    public org.modeshape.jcr.JcrValue createValue(Date value)

  Description copied from interface: `ValueFactory`
  Creates a JCR compatible `Value` from a `Date` instance.

  Parameters:
    `value` - a non-null date instance
  Returns:
    a JCR value

### createValue

    public org.modeshape.jcr.JcrValue createValue(Reference value)

### createName

    public String createName(String localName)

  Description copied from interface: `ValueFactory`
  Creates a JCR compliant name string, from the given local name.

  Parameters:
    `localName` - a non-null string.
  Returns:
    a name-compliant string

### createName

    public String createName(String namespaceUri,
                             String localName)

  Description copied from interface: `ValueFactory`
  Creates a JCR compliant name string, from the given namespace uri and local name.

  Parameters:
    `namespaceUri` - a non-null string.
    `localName` - a non-null string.
  Returns:
    a name-compliant string

### valueFactoryFor

    protected ValueFactory<?> valueFactoryFor(int jcrPropertyType)

### convertValueToType

    protected Object convertValueToType(Object value,
                                        int toType)
                                 throws ValueFormatException

  Throws:
    `ValueFormatException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.