KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > za > org > coefficient > core > CoefficientConfiguration


1 /*
2  * Coefficient - facilitates project based collaboration
3  * Copyright (C) 2003, Dylan Etkin, CSIR icomtek
4  * PO Box 395
5  * Pretoria 0001, RSA
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */

19
20 package za.org.coefficient.core;
21
22 import java.util.HashMap JavaDoc;
23 import java.util.Map JavaDoc;
24
25 /**
26  * @hibernate.class
27  * table="COEFFICIENT_CONFIGURATION"
28  */

29 public class CoefficientConfiguration implements java.io.Serializable JavaDoc {
30
31     private Long JavaDoc id;
32     private String JavaDoc forClass;
33     private Map JavaDoc properties = new HashMap JavaDoc();
34
35     /**
36      * Sets the value of id
37      *
38      * @param argId Value to assign to this.id
39      */

40     public void setId(Long JavaDoc argId) {
41         this.id = argId;
42     }
43
44     /**
45      * Gets the value of id
46      *
47      * @return the value of id
48      * @hibernate.id
49      * generator-class="native"
50      */

51     public Long JavaDoc getId() {
52         return this.id;
53     }
54
55     /**
56      * Sets the value of forClass
57      *
58      * @param clazz Value to assign to this.forClazz
59      */

60     public void setForClass(String JavaDoc clazz) {
61         this.forClass = clazz;
62     }
63
64     /**
65      * Gets the value of forClazz
66      *
67      * @return the value of forClazz
68      * @hibernate.property
69      * column="FOR_CLASS"
70      */

71     public String JavaDoc getForClass() {
72         return this.forClass;
73     }
74
75     /**
76      * Sets the value of Properties
77      *
78      * @param argProperties Value to assign to this.Properties
79      */

80     public void setProperties(Map JavaDoc argProperties) {
81         this.properties = argProperties;
82     }
83
84     /**
85      * Gets the value of Properties
86      *
87      * @return the value of Properties
88      * @hibernate.map
89      * cascade="all"
90      * table="COEFFICIENT_CONFIGURATION_PROPERTIES"
91      * @hibernate.collection-key
92      * column="ID"
93      * @hibernate.collection-index
94      * column="IDX"
95      * type="string"
96      * @hibernate.collection-element
97      * column="PROPERTIES"
98      * type="string"
99      */

100     public Map JavaDoc getProperties() {
101         return this.properties;
102     }
103
104     public void addProperty(String JavaDoc key, String JavaDoc value) {
105         this.properties.put(key, value);
106     }
107
108     public String JavaDoc getProperty(String JavaDoc key) {
109         return (String JavaDoc)this.properties.get(key);
110     }
111 }
112
Popular Tags