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.7 2003/12/20 20:27:09 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 comment;
87 /** nullable persistent field */
88 private String source;
90 /** nullable persistent field */
91 private Date publishDate;
93 /** nullable persistent field */
94 private String publishServer;
96 /** nullable persistent field */
97 private String publishPath;
99 /** persistent field */
100 private boolean isPublished;
102 /** persistent field */
103 private boolean isProduced;
105 /** persistent field */
106 private Date webdbCreate;
108 /** nullable persistent field */
109 private Date webdbLastchange;
111 /** nullable persistent field */
112 private MirUser publisher;
114 /** nullable persistent field */
115 private Language language;
117 /** nullable persistent field */
118 private Rights rights;
122 /** default constructor */
127 public java.lang.Integer getId() {
131 public void setId(java.lang.Integer id) {
135 public java.lang.String getTitle() {
139 public void setTitle(java.lang.String title) {
143 public java.lang.String getSubtitle() {
144 return this.subtitle;
147 public void setSubtitle(java.lang.String subtitle) {
148 this.subtitle = subtitle;
151 public java.lang.String getEdittitle() {
152 return this.edittitle;
155 public void setEdittitle(java.lang.String edittitle) {
156 this.edittitle = edittitle;
159 public java.lang.String getDate() {
163 public void setDate(java.lang.String date) {
167 public java.lang.String getCreator() {
171 public void setCreator(java.lang.String creator) {
172 this.creator = creator;
175 public java.lang.String getCreatorMainUrl() {
176 return this.creatorMainUrl;
179 public void setCreatorMainUrl(java.lang.String creatorMainUrl) {
180 this.creatorMainUrl = creatorMainUrl;
183 public java.lang.String getCreatorEmail() {
184 return this.creatorEmail;
187 public void setCreatorEmail(java.lang.String creatorEmail) {
188 this.creatorEmail = creatorEmail;
191 public java.lang.String getCreatorAddress() {
192 return this.creatorAddress;
195 public void setCreatorAddress(java.lang.String creatorAddress) {
196 this.creatorAddress = creatorAddress;
199 public java.lang.String getCreatorPhone() {
200 return this.creatorPhone;
203 public void setCreatorPhone(java.lang.String creatorPhone) {
204 this.creatorPhone = creatorPhone;
207 public java.lang.String getDescription() {
208 return this.description;
211 public void setDescription(java.lang.String description) {
212 this.description = description;
215 public java.lang.String getComment() {
219 public void setComment(java.lang.String comment) {
220 this.comment = comment;
223 public java.lang.String getSource() {
227 public void setSource(java.lang.String source) {
228 this.source = source;
231 public java.util.Date getPublishDate() {
232 return this.publishDate;
235 public void setPublishDate(java.util.Date publishDate) {
236 this.publishDate = publishDate;
239 public java.lang.String getPublishServer() {
240 return this.publishServer;
243 public void setPublishServer(java.lang.String publishServer) {
244 this.publishServer = publishServer;
247 public java.lang.String getPublishPath() {
248 return this.publishPath;
251 public void setPublishPath(java.lang.String publishPath) {
252 this.publishPath = publishPath;
255 public java.util.Date getWebdbCreate() {
256 return this.webdbCreate;
259 public void setWebdbCreate(java.util.Date webdbCreate) {
260 this.webdbCreate = webdbCreate;
263 public java.util.Date getWebdbLastchange() {
264 return this.webdbLastchange;
267 public void setWebdbLastchange(java.util.Date webdbLastchange) {
268 this.webdbLastchange = webdbLastchange;
271 public mir.core.model.MirUser getPublisher() {
272 return this.publisher;
275 public void setPublisher(mir.core.model.MirUser publisher) {
276 this.publisher = publisher;
279 public mir.core.model.Language getLanguage() {
280 return this.language;
283 public void setLanguage(Language language) {
284 this.language = language;
287 public mir.core.model.Rights getRights() {
291 public void setRights(mir.core.model.Rights rights) {
292 this.rights = rights;
298 public Set getContent() {
305 public void setContent(Set content) {
306 this.content = content;
312 public boolean isProduced() {
319 public boolean getProduced() {
326 public void setProduced(boolean isProduced) {
327 this.isProduced = isProduced;
333 public boolean isPublished() {
340 public void setPublished(boolean isPublished) {
341 this.isPublished = isPublished;
344 public String toString() {
345 return new ToStringBuilder(this)
346 .append("id", getId())
350 public boolean equals(Object other) {
351 if ( !(other instanceof Media) ) return false;
352 Media castOther = (Media) other;
353 return new EqualsBuilder()
354 .append(this.getId(), castOther.getId())
358 public int hashCode() {
359 return new HashCodeBuilder()