KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > cmp2 > idxandusersql > ejb > CMR2Bean


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.cmp2.idxandusersql.ejb;
23
24 import java.util.Collection JavaDoc;
25 import javax.ejb.EntityBean JavaDoc;
26
27 /**
28  * Test the dbindex feature
29  * @author heiko.rupp@cellent.de
30  * @version $Revision: 37406 $
31  *
32  * @ejb.bean name="CMR2"
33  * type="CMP"
34  * cmp-version="2.x"
35  * view-type="local"
36  * primkey-field="pKey2"
37  *
38  * @ejb.util generate="false"
39  *
40  * @ejb.persistence table-name = "CMR2"
41  *
42  * @jboss.persistence
43  * create-table = "true"
44  * remove-table = "true"
45  *
46  */

47 public abstract class CMR2Bean implements EntityBean JavaDoc
48 {
49
50    /**
51     * We don't call them, just have them here to
52     * satisfy the cmp-engine
53     * @ejb.create-method
54     */

55    public String JavaDoc ejbCreate() throws javax.ejb.CreateException JavaDoc
56    {
57       return null;
58    }
59
60    public void ejbPostCreate()
61    {
62
63    }
64
65    /**
66     * @ejb.interface-method
67     * @param pKey2
68     */

69    public abstract void setPKey2(String JavaDoc pKey2);
70
71    /**
72     * @ejb.interface-method
73     * @ejb.persistent-field
74     */

75    public abstract String JavaDoc getPKey2();
76
77    /**
78     * This field gets a <dbindex/> that we want to
79     * look up in the database to see if the index
80     * was really created on the file.
81     * @ejb.interface-method
82     * @ejb.persistent-field
83     * @todo set the dbindex property here with a modern xdoclet*
84     */

85    public abstract String JavaDoc getFoo2();
86
87    /**
88     * This one is not indexed
89     * @ejb.interface-method
90     * @ejb.persistent-field
91     */

92    public abstract String JavaDoc getBar2();
93
94    //
95
// many-many relation to CMR2
96
//
97
/**
98     * @ejb.interface-method
99     */

100    public abstract Collection JavaDoc getIdxs();
101
102    /**
103     * @ejb.interface-method
104     */

105    public abstract void setIdxs(Collection JavaDoc Idxs);
106
107 }
108
Popular Tags