org.chromattic.metamodel.mapping.jcr
Class PropertyMetaType<T>

java.lang.Object
  extended by org.chromattic.metamodel.mapping.jcr.PropertyMetaType<T>
Type Parameters:
T - the java type modeling the simple type

public abstract class PropertyMetaType<T>
extends java.lang.Object

A property meta type is a representation of the various JCR types defined by PropertyType.

Version:
$Revision$
Author:
Julien Viet

Field Summary
static PropertyMetaType<java.io.InputStream> BINARY
          .
static PropertyMetaType<java.lang.Boolean> BOOLEAN
          .
static PropertyMetaType<java.util.Calendar> DATE
          .
static PropertyMetaType<java.lang.Double> DOUBLE
          .
static PropertyMetaType<java.lang.Long> LONG
          .
static PropertyMetaType<java.lang.String> NAME
          .
static PropertyMetaType<java.lang.String> PATH
          .
static PropertyMetaType<java.lang.String> STRING
          .
 
Method Summary
static PropertyMetaType<?> get(int code)
           
 int getCode()
          Returns the JCR property type as defined by PropertyType
 java.lang.Class<T> getJavaType()
          Returns the Java type modelling the property type.
abstract  T getValue(javax.jcr.Value value)
           
abstract  javax.jcr.Value getValue(javax.jcr.ValueFactory factory, T t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STRING

public static final PropertyMetaType<java.lang.String> STRING
.


PATH

public static final PropertyMetaType<java.lang.String> PATH
.


NAME

public static final PropertyMetaType<java.lang.String> NAME
.


LONG

public static final PropertyMetaType<java.lang.Long> LONG
.


DOUBLE

public static final PropertyMetaType<java.lang.Double> DOUBLE
.


BOOLEAN

public static final PropertyMetaType<java.lang.Boolean> BOOLEAN
.


BINARY

public static final PropertyMetaType<java.io.InputStream> BINARY
.


DATE

public static final PropertyMetaType<java.util.Calendar> DATE
.

Method Detail

get

public static PropertyMetaType<?> get(int code)

getValue

public abstract javax.jcr.Value getValue(javax.jcr.ValueFactory factory,
                                         T t)
                                  throws javax.jcr.ValueFormatException
Throws:
javax.jcr.ValueFormatException

getValue

public abstract T getValue(javax.jcr.Value value)
                    throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getJavaType

public java.lang.Class<T> getJavaType()
Returns the Java type modelling the property type.

Returns:
the Java type modelling the property type

getCode

public int getCode()
Returns the JCR property type as defined by PropertyType

Returns:
the JCR property type


Copyright © 2011 eXo Platform SAS. All Rights Reserved.