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

import java.util.Collection;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Id;
import javax.persistence.CascadeType;

/**
 * comment
 *
 * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
 */
@Entity
public class Category
{
   private long id;
   private Collection<Item> items;

   @Id
   public long getId()
   {
      return id;
   }

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

   @OneToMany(cascade={CascadeType.ALL})
   @JoinColumn(name="CATEGORY_ID")
   public Collection<Item> getItems()
   {
      return items;
   }

   public void setItems(Collection<Item> items)
   {
      this.items = items;
   }

}
