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

import javax.persistence.AccessType;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Id;
import javax.persistence.GeneratorType;
import java.util.Set;


/**
 * Corporate like Air France
 *
 * @author Emmanuel Bernard
 */
@Entity(access = AccessType.FIELD)
public class FieldCompany implements java.io.Serializable
{
   @Id(generate = GeneratorType.IDENTITY)
   private Integer id;

   private String name;

   @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy="company")
   private Set<FieldFlight> flights;

   public Integer getId()
   {
      return id;
   }

   public String getName()
   {
      return name;
   }


   public void setId(Integer integer)
   {
      id = integer;
   }


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


   public Set<FieldFlight> getFlights()
   {
      return flights;
   }

   public void setFlights(Set<FieldFlight> flights)
   {
      this.flights = flights;
   }


}
