View Javadoc

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