KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > instrument > Document


1 //$Id: Document.java,v 1.3 2005/02/15 05:56:55 oneovthafew Exp $
2
package org.hibernate.test.instrument;
3
4 import java.util.Date JavaDoc;
5
6 /**
7  * @author Gavin King
8  */

9 public class Document {
10     private Long JavaDoc id;
11     private String JavaDoc name;
12     private String JavaDoc upperCaseName;
13     private String JavaDoc summary;
14     private String JavaDoc text;
15     private Owner owner;
16     private Folder folder;
17     private Date JavaDoc lastTextModification = new Date JavaDoc();
18     /**
19      * @return Returns the folder.
20      */

21     public Folder getFolder() {
22         return folder;
23     }
24     /**
25      * @param folder The folder to set.
26      */

27     public void setFolder(Folder folder) {
28         this.folder = folder;
29     }
30     /**
31      * @return Returns the owner.
32      */

33     public Owner getOwner() {
34         return owner;
35     }
36     /**
37      * @param owner The owner to set.
38      */

39     public void setOwner(Owner owner) {
40         this.owner = owner;
41     }
42     /**
43      * @return Returns the id.
44      */

45     public Long JavaDoc getId() {
46         return id;
47     }
48     /**
49      * @param id The id to set.
50      */

51     public void setId(Long JavaDoc id) {
52         this.id = id;
53     }
54     /**
55      * @return Returns the name.
56      */

57     public String JavaDoc getName() {
58         return name;
59     }
60     /**
61      * @param name The name to set.
62      */

63     public void setName(String JavaDoc name) {
64         this.name = name;
65     }
66     /**
67      * @return Returns the summary.
68      */

69     public String JavaDoc getSummary() {
70         return summary;
71     }
72     /**
73      * @param summary The summary to set.
74      */

75     public void setSummary(String JavaDoc summary) {
76         this.summary = summary;
77     }
78     /**
79      * @return Returns the text.
80      */

81     public String JavaDoc getText() {
82         return text;
83     }
84     /**
85      * @param text The text to set.
86      */

87     private void setText(String JavaDoc text) {
88         this.text = text;
89     }
90     /**
91      * @return Returns the upperCaseName.
92      */

93     public String JavaDoc getUpperCaseName() {
94         return upperCaseName;
95     }
96     /**
97      * @param upperCaseName The upperCaseName to set.
98      */

99     public void setUpperCaseName(String JavaDoc upperCaseName) {
100         this.upperCaseName = upperCaseName;
101     }
102     
103     public void updateText(String JavaDoc newText) {
104         if ( !newText.equals(text) ) {
105             this.text = newText;
106             lastTextModification = new Date JavaDoc();
107         }
108     }
109     
110 }
111
Popular Tags