4 * Copyright (C) 2001, 2002, 2003 The Mir-coders group
6 * This file is part of Mir.
8 * Mir is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Mir is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Mir; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * In addition, as a special exception, The Mir-coders gives permission to link
23 * the code of this program with any library licensed under the Apache Software License,
24 * The Sun (tm) Java Advanced Imaging library (JAI), The Sun JIMI library
25 * (or with modified versions of the above that use the same license as the above),
26 * and distribute linked combinations including the two. You must obey the
27 * GNU General Public License in all respects for all of the code used other than
28 * the above mentioned libraries. If you modify this file, you may extend this
29 * exception to your version of the file, but you are not obligated to do so.
30 * If you do not wish to do so, delete this exception statement from your version.
33 package mir.core.model;
35 import java.io.Serializable;
36 import java.util.Date;
39 import org.apache.commons.lang.builder.EqualsBuilder;
40 import org.apache.commons.lang.builder.HashCodeBuilder;
41 import org.apache.commons.lang.builder.ToStringBuilder;
47 * @version $Id: Media.java,v 1.4 2003/08/19 00:41:54 idfx Exp $
49 public class Media implements Serializable, IMedia {
51 /** identifier field */
54 /** persistent field */
57 /** nullable persistent field */
58 private String subtitle;
60 /** nullable persistent field */
61 private String edittitle;
63 /** persistent field */
66 /** nullable persistent field */
67 private String creator;
69 /** nullable persistent field */
70 private String creatorMainUrl;
72 /** nullable persistent field */
73 private String creatorEmail;
75 /** nullable persistent field */
76 private String creatorAddress;
78 /** nullable persistent field */
79 private String creatorPhone;
81 /** nullable persistent field */
82 private String description;
84 /** nullable persistent field */
85 private String keywords;
87 /** nullable persistent field */
88 private String comment;
90 /** nullable persistent field */
91 private String source;
93 /** nullable persistent field */
94 private Date publishDate;
96 /** nullable persistent field */
97 private String publishServer;
99 /** nullable persistent field */
100 private String publishPath;
102 /** persistent field */
103 private boolean isPublished;
105 /** persistent field */
106 private boolean isProduced;
108 /** persistent field */
109 private Date webdbCreate;
111 /** nullable persistent field */
112 private Date webdbLastchange;
114 /** nullable persistent field */
115 private mir.core.model.Feature feature;
117 /** nullable persistent field */
118 private MirUser publisher;
120 /** nullable persistent field */
121 private Language language;
123 /** nullable persistent field */
124 private Rights rights;
128 /** default constructor */
133 public java.lang.Integer getId() {
137 public void setId(java.lang.Integer id) {
141 public java.lang.String getTitle() {
145 public void setTitle(java.lang.String title) {
149 public java.lang.String getSubtitle() {
150 return this.subtitle;
153 public void setSubtitle(java.lang.String subtitle) {
154 this.subtitle = subtitle;
157 public java.lang.String getEdittitle() {
158 return this.edittitle;
161 public void setEdittitle(java.lang.String edittitle) {
162 this.edittitle = edittitle;
165 public java.lang.String getDate() {
169 public void setDate(java.lang.String date) {
173 public java.lang.String getCreator() {
177 public void setCreator(java.lang.String creator) {
178 this.creator = creator;
181 public java.lang.String getCreatorMainUrl() {
182 return this.creatorMainUrl;
185 public void setCreatorMainUrl(java.lang.String creatorMainUrl) {
186 this.creatorMainUrl = creatorMainUrl;
189 public java.lang.String getCreatorEmail() {
190 return this.creatorEmail;
193 public void setCreatorEmail(java.lang.String creatorEmail) {
194 this.creatorEmail = creatorEmail;
197 public java.lang.String getCreatorAddress() {
198 return this.creatorAddress;
201 public void setCreatorAddress(java.lang.String creatorAddress) {
202 this.creatorAddress = creatorAddress;
205 public java.lang.String getCreatorPhone() {
206 return this.creatorPhone;
209 public void setCreatorPhone(java.lang.String creatorPhone) {
210 this.creatorPhone = creatorPhone;
213 public java.lang.String getDescription() {
214 return this.description;
217 public void setDescription(java.lang.String description) {
218 this.description = description;
221 public java.lang.String getKeywords() {
222 return this.keywords;
225 public void setKeywords(java.lang.String keywords) {
226 this.keywords = keywords;
229 public java.lang.String getComment() {
233 public void setComment(java.lang.String comment) {
234 this.comment = comment;
237 public java.lang.String getSource() {
241 public void setSource(java.lang.String source) {
242 this.source = source;
245 public java.util.Date getPublishDate() {
246 return this.publishDate;
249 public void setPublishDate(java.util.Date publishDate) {
250 this.publishDate = publishDate;
253 public java.lang.String getPublishServer() {
254 return this.publishServer;
257 public void setPublishServer(java.lang.String publishServer) {
258 this.publishServer = publishServer;
261 public java.lang.String getPublishPath() {
262 return this.publishPath;
265 public void setPublishPath(java.lang.String publishPath) {
266 this.publishPath = publishPath;
269 public boolean isIsPublished() {
270 return this.isPublished;
273 public void setIsPublished(boolean isPublished) {
274 this.isPublished = isPublished;
277 public boolean isIsProduced() {
278 return this.isProduced;
281 public void setIsProduced(boolean isProduced) {
282 this.isProduced = isProduced;
285 public java.util.Date getWebdbCreate() {
286 return this.webdbCreate;
289 public void setWebdbCreate(java.util.Date webdbCreate) {
290 this.webdbCreate = webdbCreate;
293 public java.util.Date getWebdbLastchange() {
294 return this.webdbLastchange;
297 public void setWebdbLastchange(java.util.Date webdbLastchange) {
298 this.webdbLastchange = webdbLastchange;
301 public mir.core.model.Feature getFeature() {
305 public void setFeature(mir.core.model.Feature feature) {
306 this.feature = feature;
309 public mir.core.model.MirUser getPublisher() {
310 return this.publisher;
313 public void setPublisher(mir.core.model.MirUser publisher) {
314 this.publisher = publisher;
317 public mir.core.model.Language getLanguage() {
318 return this.language;
321 public void setLanguage(mir.core.model.Language language) {
322 this.language = language;
325 public mir.core.model.Rights getRights() {
329 public void setRights(mir.core.model.Rights rights) {
330 this.rights = rights;
336 public Set getContent() {
343 public void setContent(Set content) {
344 this.content = content;
350 public boolean isProduced() {
357 public void setProduced(boolean isProduced) {
358 this.isProduced = isProduced;
364 public boolean isPublished() {
371 public void setPublished(boolean isPublished) {
372 this.isPublished = isPublished;
375 public String toString() {
376 return new ToStringBuilder(this)
377 .append("id", getId())
381 public boolean equals(Object other) {
382 if ( !(other instanceof Media) ) return false;
383 Media castOther = (Media) other;
384 return new EqualsBuilder()
385 .append(this.getId(), castOther.getId())
389 public int hashCode() {
390 return new HashCodeBuilder()