org.wso2.carbon.rule.kernel.internal.util
Class DataBindUtil

java.lang.Object
  extended by org.wso2.carbon.rule.kernel.internal.util.DataBindUtil

public class DataBindUtil
extends Object


Constructor Summary
DataBindUtil()
           
 
Method Summary
static Object getValue(org.apache.axiom.om.OMElement omElement, Class type)
          utility method convert the OMElements to java objects.
static org.apache.axiom.om.OMElement toOM(Object object, QName parentQname)
          Utility method to convert the java objects to OMElements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBindUtil

public DataBindUtil()
Method Detail

toOM

public static org.apache.axiom.om.OMElement toOM(Object object,
                                                 QName parentQname)
Utility method to convert the java objects to OMElements

Parameters:
object - - POJO object to be converted to an OMElement
parentQname - - Top element QName for this POJO object
Returns:
- corresponding OMElement for POJO Object

getValue

public static Object getValue(org.apache.axiom.om.OMElement omElement,
                              Class type)
                       throws org.wso2.carbon.rule.common.exception.RuleRuntimeException
utility method convert the OMElements to java objects.

Parameters:
omElement - - OMElement to be used to get the POJO object value
type - - class name of the POJO element to be created
Returns:
- the created fact object
Throws:
org.wso2.carbon.rule.common.exception.RuleRuntimeException - - if there is a problem in creating POJO object


Copyright © 2015 WSO2. All rights reserved.