/*
* JBoss, Home of Professional Open Source
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
//$Id: Customer.java,v 1.2.2.5 2005/09/27 01:49:20 starksm Exp $
package org.jboss.ejb3.test.pkg;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.SecondaryTable;

/**
 * Company customer
 *
 * @author Emmanuel Bernard
 */
@Entity
@SecondaryTable(name = "EMBEDDED_ADDRESS")
@JoinColumn(name = "address_id")
public class Customer implements java.io.Serializable
{
   Long id;
   String name;
   String street;
   String city;
   String state;
   String zip;

   public
   Customer()
   {
   }

   @Id(generate = GeneratorType.IDENTITY)
   public
   Long getId()
   {
      return id;
   }

   public
   String getName()
   {
      return name;
   }

   public
   void setId(Long long1)
   {
      id = long1;
   }

   public
   void setName(String string)
   {
      name = string;
   }

   @Column(name = "street", secondaryTable = "EMBEDDED_ADDRESS")
   public String getStreet()
   {
      return street;
   }

   public void setStreet(String street)
   {
      this.street = street;
   }

   @Column(name = "city", secondaryTable = "EMBEDDED_ADDRESS")
   public String getCity()
   {
      return city;
   }

   public void setCity(String city)
   {
      this.city = city;
   }

   @Column(name = "state", secondaryTable = "EMBEDDED_ADDRESS")
   public String getState()
   {
      return state;
   }

   public void setState(String state)
   {
      this.state = state;
   }

   @Column(name = "zip", secondaryTable = "EMBEDDED_ADDRESS")
   public String getZip()
   {
      return zip;
   }

   public void setZip(String zip)
   {
      this.zip = zip;
   }

}

