org.chromattic.core.vt2
Class ValueDefinition<I,E>
java.lang.Object
org.chromattic.core.vt2.ValueDefinition<I,E>
public class ValueDefinition<I,E>
- extends java.lang.Object
- Version:
- $Revision$
- Author:
- Julien Viet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValueDefinition
public ValueDefinition(java.lang.Class<?> realType,
PropertyMetaType<I> propertyMetaType,
SimpleTypeProvider<I,E> valueType,
java.util.List<java.lang.String> defaultValue)
get
public static ValueDefinition<?,?> get(java.lang.Object o)
get
public static ValueDefinition<?,?> get(int code)
isPrimitive
public boolean isPrimitive()
getDefaultValue
public java.util.List<E> getDefaultValue()
get
public javax.jcr.Value get(javax.jcr.ValueFactory factory,
int expectedType,
E value)
throws javax.jcr.RepositoryException,
java.lang.ClassCastException
- Converts an external value to a JCR value.
- Parameters:
factory - the value factoryexpectedType - the expected JCR typevalue - the value to convert
- Returns:
- the converted value
- Throws:
javax.jcr.RepositoryException - any repository exception
java.lang.ClassCastException - if the value does not meet the expected type
get
public E get(javax.jcr.Value value)
throws javax.jcr.RepositoryException,
java.lang.ClassCastException
- Converts a JCR value to its external representation.
- Parameters:
value - the value to convert
- Returns:
- the converted value
- Throws:
javax.jcr.RepositoryException - any repository exception
java.lang.ClassCastException - if the value type is not the expected type
getRealType
public java.lang.Class<?> getRealType()
getObjectType
public java.lang.Class<E> getObjectType()
Copyright © 2012 eXo Platform SAS. All Rights Reserved.