KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > dd > EntityEnterpriseBean


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.dd;
8
9 import java.util.ArrayList JavaDoc;
10 import java.util.List JavaDoc;
11
12 /**
13  * Represents an Entity EJB element of the ejb-jar.xml deployment descriptor for
14  * the 1.4 schema
15  *
16  * @version <tt>$Revision: 1.4.2.1 $</tt>
17  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
18  */

19 public class EntityEnterpriseBean extends EnterpriseBean
20 {
21
22    private String JavaDoc persistenceType;
23
24    private List JavaDoc cmpFields = new ArrayList JavaDoc();
25
26    private List JavaDoc queries = new ArrayList JavaDoc();
27
28    public String JavaDoc getPersistenceType()
29    {
30       return persistenceType;
31    }
32
33    public void setPersistenceType(String JavaDoc persistenceType)
34    {
35       this.persistenceType = persistenceType;
36    }
37
38    public List JavaDoc getCmpFields()
39    {
40       return cmpFields;
41    }
42
43    public void setCmpFields(List JavaDoc cmpFields)
44    {
45       this.cmpFields = cmpFields;
46    }
47
48    public void addCmpField(CmpField cmpField)
49    {
50       cmpFields.add(cmpField);
51    }
52
53    public List JavaDoc getQueries()
54    {
55       return queries;
56    }
57
58    public void setQueries(List JavaDoc queries)
59    {
60       this.queries = queries;
61    }
62
63    public void addQuery(Query query)
64    {
65       queries.add(query);
66    }
67
68    public String JavaDoc toString()
69    {
70       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
71       sb.append('[');
72       sb.append(super.toString());
73       sb.append(",");
74       sb.append("persistenceType=").append(persistenceType);
75       sb.append(']');
76       return sb.toString();
77    }
78 }
79
Popular Tags