View Javadoc

1   package com.germinus.merlin.model;
2   
3   // Generated 15-ene-2008 12:57:02 by Hibernate Tools 3.2.0.CR1
4   
5   import javax.persistence.Column;
6   import javax.persistence.Entity;
7   import javax.persistence.FetchType;
8   import javax.persistence.GeneratedValue;
9   import javax.persistence.Id;
10  import javax.persistence.JoinColumn;
11  import javax.persistence.ManyToOne;
12  import javax.persistence.Table;
13  
14  import org.hibernate.annotations.GenericGenerator;
15  
16  /**
17   * ForumTopic generated by hbm2java
18   */
19  @Entity
20  @Table(name = "ForumTopics")
21  public class ForumTopic extends Resource implements java.io.Serializable {
22  
23  	/**
24  	 * @author David Jiménez, Germinus XXI
25  	 * @since 1.0
26  	*/
27  	private static final long serialVersionUID = 744214327261057352L;
28  	
29  	public ForumTopic() {
30  	}
31  
32  	public ForumTopic(long topicid,String description, ResourceContainer resourceContainer) {
33  		this.id = topicid;
34  		this.resourceContainer = resourceContainer;
35  		this.description=description;
36  	}
37  
38  	public ForumTopic(long topicid, ResourceContainer resourceContainer,
39  			String name, String description) {
40  		this.id = topicid;
41  		this.resourceContainer = resourceContainer;
42  		this.name = name;
43  		this.description=description;
44  	}
45  
46  	@Id @GeneratedValue(generator="system-increment")
47  	@GenericGenerator(name="system-increment", strategy = "increment")
48  	@Column(name = "topicid", unique = true, nullable = false)
49  	public long getTopicid() {
50  		return this.id;
51  	}
52  
53  	public void setTopicid(long topicid) {
54  		this.id = topicid;
55  	}
56  
57  	@ManyToOne(fetch = FetchType.LAZY)
58  	@JoinColumn(name = "idResourceContainer", nullable = false)
59  	public ResourceContainer getResourceContainer() {
60  		return this.resourceContainer;
61  	}
62  
63  	public void setResourceContainer(ResourceContainer resourceContainer) {
64  		this.resourceContainer = resourceContainer;
65  	}
66  
67  	@Column(name = "name", length = 75)
68  	public String getName() {
69  		return this.name;
70  	}
71  
72  	public void setName(String name) {
73  		this.name = name;
74  	}
75  	
76  	@Column(name = "description", length = 200)
77  	public String getDescription() {
78  		return this.description;
79  	}
80  
81  	public void setDescription(String description) {
82  		this.description = description;
83  	}
84  
85  }