View Javadoc
1   package gboat2.base.dao.impl;
2   
3   import java.util.HashSet;
4   import java.util.Set;
5   
6   import javax.persistence.Column;
7   import javax.persistence.Entity;
8   import javax.persistence.GeneratedValue;
9   import javax.persistence.Id;
10  import javax.persistence.Table;
11  
12  import org.hibernate.annotations.GenericGenerator;
13  
14  /**
15   * CmsModule entity. @author MyEclipse Persistence Tools
16   */
17  @Entity
18  @Table(name = "cms_module")
19  public class CmsModule implements java.io.Serializable {
20  
21  	// Fields
22  
23  	private String id;
24  	private CmsModule cmsModule;
25  	private String parentId;
26  	private String name;
27  	private String templateId;
28  	private String isStatic;
29  	private String type;
30  	private String domain;
31  	private String code;
32  	private Set<CmsModule> cmsModules = new HashSet<CmsModule>(0);
33  
34  	// Constructors
35  
36  	/** default constructor */
37  	public CmsModule() {
38  	}
39  
40  	/** minimal constructor */
41  	public CmsModule(CmsModule cmsModule, String parentId, String name) {
42  		this.cmsModule = cmsModule;
43  		this.parentId = parentId;
44  		this.name = name;
45  	}
46  
47  	/** full constructor */
48  	public CmsModule(CmsModule cmsModule, String parentId, String name,
49  			String templateId, String isStatic, String type, String domain,
50  			String code, Set<CmsModule> cmsModules) {
51  		this.cmsModule = cmsModule;
52  		this.parentId = parentId;
53  		this.name = name;
54  		this.templateId = templateId;
55  		this.isStatic = isStatic;
56  		this.type = type;
57  		this.domain = domain;
58  		this.code = code;
59  		this.cmsModules = cmsModules;
60  	}
61  
62  	// Property accessors
63  	@GenericGenerator(name = "generator", strategy = "uuid")
64  	@Id
65  	@GeneratedValue(generator = "generator")
66  	@Column(name = "id", unique = true, nullable = false, length = 40)
67  	public String getId() {
68  		return this.id;
69  	}
70  
71  	public void setId(String id) {
72  		this.id = id;
73  	}
74  
75  	/*@ManyToOne(fetch = FetchType.LAZY)
76  	@JoinColumn(name = "id", unique = true, nullable = false, insertable = false, updatable = false)
77  	public CmsModule getCmsModule() {
78  		return this.cmsModule;
79  	}*/
80  
81  	public void setCmsModule(CmsModule cmsModule) {
82  		this.cmsModule = cmsModule;
83  	}
84  
85  	@Column(name = "parentId", nullable = true, length = 40)
86  	public String getParentId() {
87  		return this.parentId;
88  	}
89  
90  	public void setParentId(String parentId) {
91  		this.parentId = parentId;
92  	}
93  
94  	@Column(name = "name", nullable = false, length = 45)
95  	public String getName() {
96  		return this.name;
97  	}
98  
99  	public void setName(String name) {
100 		this.name = name;
101 	}
102 
103 	@Column(name = "templateId", length = 20)
104 	public String getTemplateId() {
105 		return this.templateId;
106 	}
107 
108 	public void setTemplateId(String templateId) {
109 		this.templateId = templateId;
110 	}
111 
112 	@Column(name = "isStatic", length = 1)
113 	public String getIsStatic() {
114 		return this.isStatic;
115 	}
116 
117 	public void setIsStatic(String isStatic) {
118 		this.isStatic = isStatic;
119 	}
120 
121 	@Column(name = "type", length = 1)
122 	public String getType() {
123 		return this.type;
124 	}
125 
126 	public void setType(String type) {
127 		this.type = type;
128 	}
129 
130 	@Column(name = "domain", length = 45)
131 	public String getDomain() {
132 		return this.domain;
133 	}
134 
135 	public void setDomain(String domain) {
136 		this.domain = domain;
137 	}
138 
139 	@Column(name = "code", length = 20)
140 	public String getCode() {
141 		return this.code;
142 	}
143 
144 	public void setCode(String code) {
145 		this.code = code;
146 	}
147 
148 	/*
149 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cmsModule")
150 	public Set<CmsModule> getCmsModules() {
151 		return this.cmsModules;
152 	}
153 	*/
154 
155 	public void setCmsModules(Set<CmsModule> cmsModules) {
156 		this.cmsModules = cmsModules;
157 	}
158 
159 }