com.sap.caf.rt.util

Class JPAValuesConvertor

java.lang.Object
  extended by com.sap.caf.rt.util.JPAValuesConvertor

public class JPAValuesConvertor
extends Object


Constructor Summary
JPAValuesConvertor()
           
 
Method Summary
static
<T> T
convertFromJPAValue(Object value, Class<T> targetClass)
           
static
<T> T
convertFromJPAValue(Object value, Class<T> targetClass, String fieldName)
           
static
<T> T
convertToJPAValue(Object value, Class<T> targetClass)
           
static
<T> T
convertToJPAValue(Object value, Class<T> targetClass, String fieldName)
          Performs conversion of value, coming from the client layer into JPA persistable value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JPAValuesConvertor

public JPAValuesConvertor()
Method Detail

convertFromJPAValue

public static <T> T convertFromJPAValue(Object value,
                                        Class<T> targetClass,
                                        String fieldName)

convertToJPAValue

public static <T> T convertToJPAValue(Object value,
                                      Class<T> targetClass,
                                      String fieldName)
Performs conversion of value, coming from the client layer into JPA persistable value. Values coming from client layer are not necessarily directly persistable, but need some conversion.

Type Parameters:
T -
Parameters:
value -
targetClass -
fieldName - name of the CAF field for which conversion takes place. This is only needed in order of throwing exception.
Returns:

convertToJPAValue

public static <T> T convertToJPAValue(Object value,
                                      Class<T> targetClass)

convertFromJPAValue

public static <T> T convertFromJPAValue(Object value,
                                        Class<T> targetClass)
Access Rights

This class can be accessed from:


SC DC
[sap.com] CAF [sap.com] caf/runtime/ear


Copyright 2010 SAP AG Complete Copyright Notice