KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > resourcebundle > DatabaseResourceBean


1 package org.jahia.resourcebundle;
2
3 /**
4  * <p>Title: database-related bean for resources stored in the Jahia database</p>
5  * <p>Description: This bean holds a single resource entry for a specific
6  * language code.</p>
7  * <p>Copyright: Copyright (c) 2002</p>
8  * <p>Company: Jahia Ltd</p>
9  * @author Serge Huber
10  * @version 1.0
11  */

12
13 public class DatabaseResourceBean {
14     private String JavaDoc name;
15     private String JavaDoc value;
16     private String JavaDoc languageCode;
17
18     /**
19      * Empty constructor. Use setter to fill this bean with data
20      */

21     public DatabaseResourceBean() {
22     }
23
24     /**
25      * Existing data constructor
26      * @param name the name of the resource
27      * @param value the value of the resource in this languageCode
28      * @param languageCode the languageCode for the value
29      */

30     public DatabaseResourceBean(String JavaDoc name, String JavaDoc value, String JavaDoc languageCode) {
31         this.name = name;
32         this.value = value;
33         this.languageCode = languageCode;
34     }
35
36     /**
37      * @return the name of the resource
38      */

39     public String JavaDoc getName() {
40         return name;
41     }
42
43     /**
44      * Sets the name of the resource for a new resource
45      * @param name the name of the resource
46      */

47     public void setName(String JavaDoc name) {
48         this.name = name;
49     }
50
51     /**
52      * @return contains the value for the resource in the given language code
53      */

54     public String JavaDoc getValue() {
55         return value;
56     }
57
58     /**
59      * Sets the value for the resource in the languageCode stored in this
60      * bean
61      * @param value the value for the languageCode
62      */

63     public void setValue(String JavaDoc value) {
64         this.value = value;
65     }
66
67     /**
68      * @return the languageCode for this resource. For the format of this
69      * language code see the setLanguageCode documentation
70      */

71     public String JavaDoc getLanguageCode() {
72         return languageCode;
73     }
74
75     /**
76      * Sets the languageCode for this resource entry
77      * @param languageCode a language code identifier in the format equivalent
78      * to the result of a Locale.toString() conversion.
79      */

80     public void setLanguageCode(String JavaDoc languageCode) {
81         this.languageCode = languageCode;
82     }
83
84 }
Popular Tags