KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > communication > forum > hibernate > TopicImpl


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.communication.forum.hibernate;
6
7 import java.util.Date JavaDoc;
8 import org.exoplatform.services.communication.forum.Topic;
9
10 /**
11  * Created by The eXo Platform SARL .
12  * Author : Tuan Nguyen
13  * tuan08@users.sourceforge.net
14  * Date: Jun 14, 2003
15  * Time: 1:12:22 PM
16  *
17  * @hibernate.class table="FORUM_TOPIC"
18  */

19 public class TopicImpl implements Topic {
20   private String JavaDoc id ;
21   private String JavaDoc forumId ;
22   private String JavaDoc owner ;
23   private Date JavaDoc createdDate ;
24   private String JavaDoc modifiedBy ;
25   private Date JavaDoc modifiedDate ;
26   private String JavaDoc lastPostBy ;
27   private Date JavaDoc lastPostDate ;
28   private String JavaDoc topic ;
29   private String JavaDoc description ;
30   private int postCount ;
31
32   public TopicImpl() {
33   }
34
35   /**
36    * @hibernate.id generator-class="assigned" unsaved-value="null"
37    ***/

38   public String JavaDoc getId() { return id ; }
39   public void setId(String JavaDoc s) { id = s ; }
40
41   /**
42    * @hibernate.property
43    **/

44   public String JavaDoc getForumId() { return forumId ; }
45   public void setForumId(String JavaDoc id) { forumId = id ; }
46   
47   /**
48    * @hibernate.property
49    **/

50   public String JavaDoc getOwner() { return owner ; }
51   public void setOwner(String JavaDoc s) { owner = s ; }
52
53   /**
54    * @hibernate.property
55    **/

56   public Date JavaDoc getCreatedDate() { return createdDate ; }
57   public void setCreatedDate(Date JavaDoc d) { createdDate = d ; }
58
59   public long getCreatedDateINT11() { return createdDate.getTime() ; }
60   public void setCreatedDateINT11(long d) { createdDate = new Date JavaDoc(d * 1000) ; }
61
62   /**
63    * @hibernate.property
64    **/

65   public String JavaDoc getModifiedBy() { return modifiedBy ; }
66   public void setModifiedBy(String JavaDoc s) { modifiedBy = s ;}
67
68   /**
69    * @hibernate.property
70    **/

71   public Date JavaDoc getModifiedDate() { return modifiedDate ; }
72   public void setModifiedDate(Date JavaDoc d) { modifiedDate = d ;}
73
74   public long getModifiedDateINT11() { return modifiedDate.getTime() ; }
75   public void setModifiedDateINT11(long d) { modifiedDate = new Date JavaDoc(d * 1000) ;}
76
77   /**
78    * @hibernate.property
79    **/

80   public String JavaDoc getLastPostBy() { return lastPostBy ; }
81   public void setLastPostBy(String JavaDoc s) { lastPostBy = s ;}
82   /**
83    * @hibernate.property
84    **/

85   public Date JavaDoc getLastPostDate() { return lastPostDate ; }
86   public void setLastPostDate(Date JavaDoc d) { lastPostDate = d ;}
87
88   /**
89    * @hibernate.property
90    **/

91   public String JavaDoc getTopic() { return topic ; }
92   public void setTopic(String JavaDoc s) { topic = s ; }
93
94   /**
95    * @hibernate.property length="65535" type="org.exoplatform.services.database.impl.TextClobType"
96    **/

97   public String JavaDoc getDescription() { return description ; }
98   public void setDescription(String JavaDoc s) { description = s; }
99
100   /**
101    * @hibernate.property
102    **/

103   public int getPostCount() { return postCount ; }
104   public void setPostCount(int num) { postCount = num ; }
105   void addPostCount(int num) { postCount += num; }
106 }
107
Popular Tags