KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > ejb > hardtoken > HardTokenPropertyEntityBean


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13
14 package org.ejbca.core.ejb.hardtoken;
15
16
17 import javax.ejb.CreateException JavaDoc;
18
19 import org.ejbca.core.ejb.BaseEntityBean;
20
21
22 /**
23  * HardTokenPropertyEntityBean is a complientary class used to assign extended
24  * properties like copyof to a hard token.
25  *
26  * Id is represented by primary key of hard token table.
27  *
28  *
29  * @ejb.bean
30  * description="This enterprise bean entity represents a hard token to certificate mappings"
31  * display-name="HardTokenPropertyDataEB"
32  * name="HardTokenPropertyData"
33  * jndi-name="HardTokenPropertyData"
34  * view-type="local"
35  * type="CMP"
36  * reentrant="False"
37  * cmp-version="2.x"
38  * transaction-type="Container"
39  * schema="HardTokenPropertyDataBean"
40  *
41  * @ejb.pk
42  * class="org.ejbca.core.ejb.hardtoken.HardTokenPropertyPK"
43  * extends="java.lang.Object"
44  *
45  * @ejb.persistence table-name = "HardTokenPropertyData"
46  *
47  * @ejb.home
48  * local-extends="javax.ejb.EJBLocalHome"
49  * local-class="org.ejbca.core.ejb.hardtoken.HardTokenPropertyLocalHome"
50  *
51  * @ejb.interface
52  * local-extends="javax.ejb.EJBLocalObject"
53  * local-class="org.ejbca.core.ejb.hardtoken.HardTokenPropertyLocal"
54  *
55  * @ejb.finder
56  * description="findByProperty"
57  * signature="org.ejbca.core.ejb.hardtoken.HardTokenPropertyLocal findByProperty(java.lang.String id, java.lang.String property)"
58  * query="SELECT OBJECT(a) from HardTokenPropertyDataBean a WHERE a.id =?1 AND a.property=?2"
59  *
60  * @ejb.finder
61  * description="findIdsByPropertyAndValue"
62  * signature="Collection findIdsByPropertyAndValue(java.lang.String property, java.lang.String value)"
63  * query="SELECT OBJECT(a) from HardTokenPropertyDataBean a WHERE a.property =?1 AND a.value=?2"
64  *
65  * @ejb.transaction type="Required"
66  *
67  * @jonas.jdbc-mapping
68  * jndi-name="${datasource.jndi-name}"
69  *
70  */

71 public abstract class HardTokenPropertyEntityBean extends BaseEntityBean {
72
73   public static final String JavaDoc PROPERTY_COPYOF = "copyof=";
74
75
76     /**
77      * @ejb.persistence column-name="id"
78      * @ejb.pk-field
79      * @ejb.interface-method
80      */

81     public abstract String JavaDoc getId();
82
83     /**
84      */

85     public abstract void setId(String JavaDoc id);
86
87     /**
88      * @ejb.persistence column-name="property"
89      * @ejb.pk-field
90      * @ejb.interface-method
91      */

92     public abstract String JavaDoc getProperty();
93
94     /**
95      */

96     public abstract void setProperty(String JavaDoc property);
97
98     /**
99      * @ejb.persistence column-name="value"
100      * @ejb.interface-method
101      */

102     public abstract String JavaDoc getValue();
103
104     /**
105      * @ejb.interface-method
106      */

107     public abstract void setValue(String JavaDoc value);
108
109     /**
110      * Entity Bean holding data of a raadmin profile.
111      * @ejb.create-method
112      */

113     public HardTokenPropertyPK ejbCreate(String JavaDoc id, String JavaDoc property, String JavaDoc value)
114            throws CreateException JavaDoc {
115         setId(id);
116         setProperty(property);
117         setValue(value);
118         return null;
119     }
120
121     public void ejbPostCreate(String JavaDoc id, String JavaDoc property, String JavaDoc value) {
122         // Do nothing. Required.
123
}
124 }
125
Popular Tags