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

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToOne;
import javax.persistence.CascadeType;
import javax.persistence.Entity;

/**
 * Flight ticket
 *
 * @author Emmanuel Bernard
 */
@Entity
public class Ticket implements java.io.Serializable
{
   Long id;
   String number;
   Customer customer;

   public Ticket()
   {
   }

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

   public String getNumber()
   {
      return number;
   }

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

   public void setNumber(String string)
   {
      number = string;
   }

   @ManyToOne(cascade = CascadeType.ALL)
   @JoinColumn(name = "CUSTOMER_ID")
   public Customer getCustomer()
   {
      return customer;
   }

   public void setCustomer(Customer customer)
   {
      this.customer = customer;
   }

}

