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   * Advise generated by hbm2java
18   */
19  @Entity
20  @Table(name = "Documents")
21  public class Document 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 = -3167630144478773370L;
28  	private String url;
29  
30  	public Document() {
31  	}
32  
33  	public Document(long documentid, ResourceContainer resourceContainer,
34  			String name, String comments, String url) {
35  		super();
36  		this.id = documentid;
37  		this.resourceContainer = resourceContainer;
38  		this.name = name;
39  		this.description = comments;
40  		this.url = url;
41  	}
42  
43  	@Id @GeneratedValue(generator="system-increment")
44  	@GenericGenerator(name="system-increment", strategy = "increment")
45  	@Column(name = "documentid", unique = true, nullable = false)
46  	public long getDocumentid() {
47  		return this.id;
48  	}
49  
50  	public void setDocumentid(long adviseid) {
51  		this.id = adviseid;
52  	}
53  
54  	@ManyToOne(fetch = FetchType.LAZY)
55  	@JoinColumn(name = "idResourceContainer",nullable = false)
56  	public ResourceContainer getResourceContainer() {
57  		return this.resourceContainer;
58  	}
59  
60  	public void setResourceContainer(ResourceContainer resourceContainer) {
61  		this.resourceContainer = resourceContainer;
62  	}
63  
64  	@Column(name = "name", length = 75)
65  	public String getName() {
66  		return this.name;
67  	}
68  
69  	public void setName(String name) {
70  		this.name = name;
71  	}
72  
73  	@Column(name = "comments")
74  	public String getComments() {
75  		return this.description;
76  	}
77  
78  	public void setComments(String comments) {
79  		this.description = comments;
80  	}
81  	
82  	@Column(name = "url")
83  	public String getUrl() {
84  		return this.url;
85  	}
86  
87  	public void setUrl(String url) {
88  		this.url = url;
89  	}
90  }