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

import java.util.ArrayList;
import java.util.List;

/**
 * Represents an Entity EJB element of the ejb-jar.xml deployment descriptor for
 * the 1.4 schema
 *
 * @author <a href="mailto:bdecoste@jboss.com">William DeCoste</a>
 * @version <tt>$Revision: 1.4.2.3 $</tt>
 */
public class EntityEnterpriseBean extends EnterpriseBean
{

   private String persistenceType;

   private List cmpFields = new ArrayList();

   private List queries = new ArrayList();

   public String getPersistenceType()
   {
      return persistenceType;
   }

   public void setPersistenceType(String persistenceType)
   {
      this.persistenceType = persistenceType;
   }

   public List getCmpFields()
   {
      return cmpFields;
   }

   public void setCmpFields(List cmpFields)
   {
      this.cmpFields = cmpFields;
   }

   public void addCmpField(CmpField cmpField)
   {
      cmpFields.add(cmpField);
   }

   public List getQueries()
   {
      return queries;
   }

   public void setQueries(List queries)
   {
      this.queries = queries;
   }

   public void addQuery(Query query)
   {
      queries.add(query);
   }

   public String toString()
   {
      StringBuffer sb = new StringBuffer(100);
      sb.append('[');
      sb.append(super.toString());
      sb.append(",");
      sb.append("persistenceType=").append(persistenceType);
      sb.append(']');
      return sb.toString();
   }
}
