1 /*
2 * Copyright (c) 2003
3 * Information Desire GmbH
4 * All rights reserved.
5 */
6 package com.infodesire.infobit.dao;
7
8 import java.util.Date;
9 import java.util.Set;
10 import com.infodesire.infobit.data.Version;
11 import com.infodesire.infobit.data.Infobit;
12 import com.infodesire.infobit.data.Content;
13
14 /***
15 * represents certain infobit version. version has an author, creation time and
16 * certain workflow status - created / checked / approved /
17 *
18 * @author konstantin
19 * @created August 6, 2003
20 * @version $Revision: 1.5 $
21 * @hibernate.class table="version"
22 */
23 class VersionImpl extends BaseEntityImpl implements Version {
24
25 /***
26 */
27 private String _name;
28
29 /***
30 */
31 private String _author;
32
33 /***
34 */
35 private long _dateMillis;
36
37 /***
38 */
39 private InfobitImpl _infobit;
40
41 /***
42 */
43 private Date _date = null;
44
45 /***
46 */
47 private Content _content;
48
49
50 /***
51 * Gets the Content attribute of the VersionImpl object
52 *
53 * @return The Content value
54 * @hibernate.one-to-one cascade="delete" outer-join="false"
55 * constrained="true" class="com.infodesire.infobit.dao.ContentImpl"
56 */
57 public Content getContent() {
58 return _content;
59 }
60
61
62
63 /***
64 * Gets the Name attribute of the Version object
65 *
66 * @return The Name value
67 * @hibernate.property
68 */
69 public String getName() {
70 return _name;
71 }
72
73
74 /***
75 * Gets the Author attribute of the Version object
76 *
77 * @return The Author value
78 * @hibernate.property
79 */
80 public String getAuthor() {
81 return _author;
82 }
83
84
85 /***
86 * Gets the DateMillis attribute of the Version object
87 *
88 * @return The DateMillis value
89 * @hibernate.property
90 */
91 public long getDateMillis() {
92 return _dateMillis;
93 }
94
95
96 /***
97 * Gets the Infobit attribute of the Version object
98 *
99 * @return The Infobit value
100 * @hibernate.many-to-one cascade="none" column="infobitid"
101 * not-null="true" outer-join="true"
102 * class="com.infodesire.infobit.dao.InfobitImpl" update="false"
103 */
104 public Infobit getInfobit() {
105 return _infobit;
106 }
107
108
109 /***
110 * Gets the Date attribute of the Version object
111 *
112 * @return The Date value
113 */
114 public Date getDate() {
115 if (_date == null) {
116 _date = new Date(getDateMillis());
117 }
118 return _date;
119 }
120
121
122 /***
123 * Sets the Content attribute of the VersionImpl object
124 *
125 * @param content The new Content value
126 */
127 public void setContent(Content content) {
128 _content = content;
129 }
130
131
132
133 /***
134 * Sets the Name attribute of the Version object
135 *
136 * @param name The new Name value
137 */
138 public void setName(String name) {
139 _name = name;
140 }
141
142
143 /***
144 * Sets the Author attribute of the Version object
145 *
146 * @param author The new Author value
147 */
148 public void setAuthor(String author) {
149 _author = author;
150 }
151
152
153 /***
154 * Sets the Date attribute of the Version object
155 *
156 * @param date The new Date value
157 */
158 public void setDate(Date date) {
159 if (date != null) {
160 setDateMillis(date.getTime());
161 }
162 _date = date;
163 }
164
165
166 /***
167 * date and time of creation
168 *
169 * @param dateMillis The new DateMillis value
170 */
171 public void setDateMillis(long dateMillis) {
172 _dateMillis = dateMillis;
173 setDate(null);
174 }
175
176
177 /***
178 * Sets the Infobit attribute of the Version object
179 *
180 * @param infobit The new Infobit value
181 */
182 public void setInfobit(InfobitImpl infobit) {
183 _infobit = infobit;
184 }
185
186 }
This page was automatically generated by Maven