001: package org.contineo.web.document;
002:
003: import org.contineo.core.document.Article;
004:
005: import java.util.Date;
006:
007: /**
008: * Utility class suitable for template display
009: *
010: * @author Marco Meschieri - Logical Objects
011: * @version $Id: ArticleRecord.java,v 1.2 2007/10/16 16:10:34 marco Exp $
012: * @since 3.0
013: */
014: public class ArticleRecord extends Article {
015: private static final long serialVersionUID = 1L;
016: private Article wrappedArticle;
017: private ArticlesRecordsManager manager;
018:
019: public ArticleRecord(Article wrappedArticle,
020: ArticlesRecordsManager manager) {
021: super ();
022: this .wrappedArticle = wrappedArticle;
023: this .manager = manager;
024: }
025:
026: public boolean equals(Object obj) {
027: return wrappedArticle.equals(obj);
028: }
029:
030: public String getArticleDate() {
031: return wrappedArticle.getArticleDate();
032: }
033:
034: public int getArticleId() {
035: return wrappedArticle.getArticleId();
036: }
037:
038: public Date getDate() {
039: return wrappedArticle.getDate();
040: }
041:
042: public int getDocId() {
043: return wrappedArticle.getDocId();
044: }
045:
046: public String getMessage() {
047: return wrappedArticle.getMessage();
048: }
049:
050: public String getSubject() {
051: return wrappedArticle.getSubject();
052: }
053:
054: public String getUsername() {
055: return wrappedArticle.getUsername();
056: }
057:
058: public int hashCode() {
059: return wrappedArticle.hashCode();
060: }
061:
062: public void setArticleDate(String articleDate) {
063: wrappedArticle.setArticleDate(articleDate);
064: }
065:
066: public void setArticleId(int articleId) {
067: wrappedArticle.setArticleId(articleId);
068: }
069:
070: public void setDate(Date date) {
071: wrappedArticle.setDate(date);
072: }
073:
074: public void setDocId(int docId) {
075: wrappedArticle.setDocId(docId);
076: }
077:
078: public void setMessage(String message) {
079: wrappedArticle.setMessage(message);
080: }
081:
082: public void setSubject(String subject) {
083: wrappedArticle.setSubject(subject);
084: }
085:
086: public void setUsername(String username) {
087: wrappedArticle.setUsername(username);
088: }
089:
090: public String toString() {
091: return wrappedArticle.toString();
092: }
093:
094: public String select() {
095: manager.setSelectedArticle(this );
096:
097: return null;
098: }
099:
100: public Article getWrappedArticle() {
101: return wrappedArticle;
102: }
103: }
|