/*
 * JBoss, the OpenSource EJB server
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.test.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratorType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 * For testing named queries
 *
 * @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
 * @version $Revision: 1.2.2.4 $
 */
@Entity
@NamedQueries (
      {@NamedQuery(name="allAirports", queryString="from Airport"),
      @NamedQuery(name="airportById", queryString="from Airport a where a.id=:id")})
public class Airport
{

   Long id;
   String code;
   String city;

   public Airport() {}

   public Airport(String code, String city)
   {
      this.code = code;
      this.city = city;
   }

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

   public void setId(Long id)
   {
      this.id = id;
   }

   public String getCode()
   {
      return code;
   }

   public void setCode(String code)
   {
      this.code = code;
   }

   public String getCity()
   {
      return city;
   }

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

}
