org.apache.jackrabbit.ocm.manager.atomictypeconverter
Interface AtomicTypeConverter

All Known Implementing Classes:
BinaryTypeConverterImpl, BooleanTypeConverterImpl, ByteArrayTypeConverterImpl, CalendarTypeConverterImpl, Date2LongTypeConverterImpl, DoubleTypeConverterImpl, IntTypeConverterImpl, LongTypeConverterImpl, NameTypeConverterImpl, NullTypeConverterImpl, PathTypeConverterImpl, ReferenceTypeConverterImpl, StringTypeConverterImpl, TimestampTypeConverterImpl, UndefinedTypeConverterImpl, UtilDateTypeConverterImpl

public interface AtomicTypeConverter

AtomicTypeConverter interface. The Object converter used atomic type converters to map atomic fields to JCR Value objects. Amotic fields are primitive java types and their wrapper classes.

Author:
Christophe Lombart, Alexandru Popescu

Method Summary
 Object getObject(Value value)
          Convert a jcr property value into an object
 Value getValue(ValueFactory valueFactory, Object object)
          Convert an object into a JCR value.
 String getXPathQueryValue(ValueFactory valueFactory, Object object)
          Get the string converted value.
 

Method Detail

getValue

Value getValue(ValueFactory valueFactory,
               Object object)
Convert an object into a JCR value.

Parameters:
valueFactory - The JCR ValueFactory
object - The object to convert
Returns:
the corresponding JCR value

getObject

Object getObject(Value value)
Convert a jcr property value into an object

Parameters:
value - The JCR property value
Returns:
the corresponding object

getXPathQueryValue

String getXPathQueryValue(ValueFactory valueFactory,
                          Object object)
Get the string converted value. This is mainly used to build xpath expressions

Parameters:
valueFactory - The JCR ValueFactory
object - The object value
Returns:
The string converted value


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.