/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.test.hbm;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.GeneratorType;
import javax.persistence.OneToOne;
import javax.persistence.CascadeType;
import javax.persistence.JoinColumn;
import javax.persistence.FetchType;
import java.io.Serializable;

/**
 * comment
 *
 * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
 */
@Entity
public class Annotated implements Serializable
{
   private long id;
   private String name;
   private HBM hbm;

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

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

   public String getName()
   {
      return name;
   }

   public void setName(String name)
   {
      this.name = name;
   }

   @OneToOne(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
   @JoinColumn(name="HBM_ID")
   public HBM getHbm()
   {
      return hbm;
   }

   public void setHbm(HBM hbm)
   {
      this.hbm = hbm;
   }


}
