KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.exoplatform.services.communication.forum.* ;
8 /**
9  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
10  * @since Nov 27, 2004
11  * @version $Id$
12  * @hibernate.class table="FORUM_WATCHER"
13  */

14 public class WatcherImpl implements Watcher {
15   final static public String JavaDoc TOPIC_TARGET = "topic" ;
16   final static public String JavaDoc FORUM_TARGET = "forum" ;
17   
18   private String JavaDoc id ;
19   private String JavaDoc topicId ;
20   private String JavaDoc forumId ;
21   private String JavaDoc target ;
22   private String JavaDoc userName ;
23   private String JavaDoc protocol ;
24   private String JavaDoc address ;
25   
26   public WatcherImpl() { }
27   
28   public WatcherImpl(Topic topic) {
29     TopicImpl impl = (TopicImpl) topic ;
30     target = TOPIC_TARGET ;
31     topicId = topic.getId() ;
32     forumId = impl.getId();
33   }
34   
35   public WatcherImpl(Forum forum) {
36     target = FORUM_TARGET ;
37     forumId = forum.getId() ;
38   }
39   
40   /**
41    * @hibernate.id generator-class="assigned" unsaved-value="null"
42    ***/

43   public String JavaDoc getId() { return id; }
44   public void setId(String JavaDoc s) { id = s ; }
45   
46   /**
47    * @hibernate.property
48    **/

49   public String JavaDoc getTopicId() { return topicId; }
50   public void setTopicId(String JavaDoc s) { topicId = s ; }
51   
52   /**
53    * @hibernate.property
54    **/

55   public String JavaDoc getForumId() { return forumId; }
56   public void setForumId(String JavaDoc s) { forumId = s ; }
57   
58   /**
59    * @hibernate.property
60    **/

61   public String JavaDoc getTarget() { return target; }
62   public void setTarget(String JavaDoc s) { target = s ; }
63   
64   /**
65    * @hibernate.property
66    **/

67   public String JavaDoc getUserName() { return userName; }
68   public void setUserName(String JavaDoc username) { this.userName = username ; }
69   
70   /**
71    * @hibernate.property
72    **/

73   public String JavaDoc getMessageProtocol() { return protocol ; }
74   public void setMessageProtocol(String JavaDoc s) { protocol = s ; }
75   
76   /**
77    * @hibernate.property
78    **/

79   public String JavaDoc getAddress() { return address ; }
80   public void setAddress(String JavaDoc email) { this.address = email ;}
81   
82 }
83
Popular Tags