/*
 * Generated file - Do not edit!
 */
package com.alodar.example.ejb;

import java.lang.*;

/**
 * CMP layer for Item.
 * @author XDOCLET 1.1.2
 * @xdoclet-generated at Aug 25, 2002 3:02:29 PM
 */
public abstract class ItemCMP
   extends com.alodar.example.ejb.ItemBean
   implements javax.ejb.EntityBean
{

   static final long serialVersionUID = -9168028755305208442L;

   private com.alodar.example.interfaces.ItemData dataHolder;

   public com.alodar.example.interfaces.ItemData getData()
   {
      if( dataHolder == null )
      {
         try
         {
            dataHolder = new com.alodar.example.interfaces.ItemData();

            dataHolder.setItemId( getItemId() );
            dataHolder.setDescription( getDescription() );

         }
         catch (Exception e)
         {
            throw new javax.ejb.EJBException(e);
         }
      }

      return dataHolder;
   }

   public void setData( com.alodar.example.interfaces.ItemData dataHolder )
   {
      try
      {
         setDescription( dataHolder.getDescription() );

         this.dataHolder = null;
      }
      catch (Exception e)
      {
         throw new javax.ejb.EJBException(e);
      }
   }

   public void ejbLoad() 
   {
      super.ejbLoad();

      dataHolder = null;

   }

   public void ejbStore() 
   {
         super.ejbStore();

   }

   public void ejbActivate() 
   {
      super.ejbActivate();
   }

   public void ejbPassivate() 
   {
      super.ejbPassivate();
      dataHolder = null;

   }

   public void setEntityContext(javax.ejb.EntityContext ctx) 
   {
      super.setEntityContext(ctx);
   }

   public void unsetEntityContext() 
   {
      super.unsetEntityContext();
   }

   public void ejbRemove() throws javax.ejb.RemoveException
   {
      super.ejbRemove();

      dataHolder = null;

   }

 /* Value Objects BEGIN */

/* This class has NO primkey-field */

/* Value Objects END */

   public abstract java.lang.Integer getItemId() ;

   public abstract void setItemId( java.lang.Integer itemId ) ;

   public abstract java.lang.String getDescription() ;

   public abstract void setDescription( java.lang.String description ) ;

}