View Javadoc

1   /*
2    * $Id: ServiceParamTO.java 7976 2007-08-21 14:26:13Z dirk.olmes $
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.samples.voipservice.to;
12  
13  import org.mule.samples.voipservice.LocaleMessage;
14  
15  import java.io.Serializable;
16  
17  /**
18   * @author Binildas Christudas
19   */
20  public class ServiceParamTO implements Serializable
21  {
22      /**
23       * Serial version
24       */
25      private static final long serialVersionUID = -4807303917627749519L;
26  
27      private CustomerTO customerTO;
28      private CreditCardTO creditCardTO;
29  
30      public ServiceParamTO()
31      {
32          super();
33      }
34  
35      public ServiceParamTO(CustomerTO customerTO, CreditCardTO creditCardTO)
36      {
37          this.customerTO = customerTO;
38          this.creditCardTO = creditCardTO;
39      }
40  
41      public void setCustomer(CustomerTO customerTO)
42      {
43          this.customerTO = customerTO;
44      }
45  
46      public CustomerTO getCustomer()
47      {
48          return customerTO;
49      }
50  
51      public void setCreditCard(CreditCardTO creditCardTO)
52      {
53          this.creditCardTO = creditCardTO;
54      }
55  
56      public CreditCardTO getCreditCard()
57      {
58          return creditCardTO;
59      }
60  
61      public String toString()
62      {
63          StringBuffer stringBuffer = new StringBuffer();
64          if (this.customerTO != null)
65          {
66              stringBuffer.append(LocaleMessage.getCustomerCaption(customerTO));
67          }
68          if (this.creditCardTO != null)
69          {
70              stringBuffer.append(LocaleMessage.getCardCaption(creditCardTO));
71          }
72  
73          return stringBuffer.toString();
74      }
75  
76  }