Coverage Report - org.mule.examples.loanbroker.transformers.LoanQuoteRequestToCreditProfileArgs
 
Classes in this File Line Coverage Branch Coverage Complexity
LoanQuoteRequestToCreditProfileArgs
0%
0/9
0%
0/4
1
 
 1  
 /*
 2  
  * $Id: LoanQuoteRequestToCreditProfileArgs.java 10087 2007-12-14 10:42:25Z holger $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.examples.loanbroker.transformers;
 12  
 
 13  
 import org.mule.examples.loanbroker.messages.LoanBrokerQuoteRequest;
 14  
 import org.mule.transformers.AbstractTransformer;
 15  
 import org.mule.umo.transformer.TransformerException;
 16  
 
 17  
 /**
 18  
  * Extracts the customer information from the request into an array of arguments used
 19  
  * to invoke the Credit Agency Session bean
 20  
  */
 21  
 public class LoanQuoteRequestToCreditProfileArgs extends AbstractTransformer
 22  
 {
 23  
 
 24  
     public LoanQuoteRequestToCreditProfileArgs()
 25  0
     {
 26  0
         registerSourceType(LoanBrokerQuoteRequest.class);
 27  0
         setReturnClass(Object[].class);
 28  0
     }
 29  
 
 30  
     public Object doTransform(Object src, String encoding) throws TransformerException
 31  
     {
 32  0
         LoanBrokerQuoteRequest request = (LoanBrokerQuoteRequest)src;
 33  0
         Object[] args = new Object[2];
 34  0
         args[0] = request.getCustomerRequest().getCustomer().getName();
 35  0
         args[1] = new Integer(request.getCustomerRequest().getCustomer().getSsn());
 36  0
         return args;
 37  
     }
 38  
 
 39  
 }