Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.remoting.samples.transporter.multiple;
 
Simple data object to represent customer data, to include Address object.

Author(s):
Tom Elrod
public class Customer implements Serializable
   private String firstName = null;
   private String lastName = null;
   private Address addr = null;
   private int customerId = -1;
   public String getFirstName()
   {
      return ;
   }
   public void setFirstName(String firstName)
   {
      this. = firstName;
   }
   public String getLastName()
   {
      return ;
   }
   public void setLastName(String lastName)
   {
      this. = lastName;
   }
   public Address getAddr()
   {
      return ;
   }
   public void setAddr(Address addr)
   {
      this. = addr;
   }
   public int getCustomerId()
   {
      return ;
   }
   public void setCustomerId(int customerId)
   {
      this. = customerId;
   }
   public String toString()
   {
      StringBuffer buffer = new StringBuffer();
      buffer.append("\nCustomer:\n");
      buffer.append("customer id: " +  + "\n");
      buffer.append("first name: " +  + "\n");
      buffer.append("last name: " +  + "\n");
      buffer.append("street: " + .getStreet() + "\n");
      buffer.append("city: " + .getCity() + "\n");
      buffer.append("state: " + .getState() + "\n");
      buffer.append("zip: " + .getZip() + "\n");
      return buffer.toString();
   }
New to GrepCode? Check out our FAQ X