View Javadoc
1   /**
2    * Copyright (c) 2009-2010 by Glodon
3    * All rights reserved.
4    */
5   package gboat2.web.model;
6   
7   import java.io.Serializable;
8   
9   import javax.persistence.Column;
10  import javax.persistence.Entity;
11  import javax.persistence.GeneratedValue;
12  import javax.persistence.Id;
13  import javax.persistence.Table;
14  
15  import org.hibernate.annotations.GenericGenerator;
16  
17  /**
18   * @author lysming
19   *
20   */
21  @Entity
22  @Table(name="G2_T_ROLE")
23  public class Role implements Serializable{
24  	private String roleId;
25  	//父角色id(预留)
26  	private String parentId;
27  	//角色编码
28  	private String roleCode;
29  	//角色名称
30  	private String roleName;
31  	//描述
32  	private String description;
33  
34  	@Id
35  	@GenericGenerator(name = "generator", strategy = "uuid.hex")
36  	@GeneratedValue(generator = "generator")
37  	@Column(name = "ROLE_ID", length = 40)
38  	public String getRoleId() {
39  		return roleId;
40  	}
41  
42  	public void setRoleId(String roleId) {
43  		this.roleId = roleId;
44  	}
45  
46  	@Column(name = "PARENT_ID", length = 40)
47  	public String getParentId() {
48  		return parentId;
49  	}
50  
51  	public void setParentId(String parentId) {
52  		this.parentId = parentId;
53  	}
54  
55  	@Column(name = "ROLE_CODE", length = 40)
56  	public String getRoleCode() {
57  		return roleCode;
58  	}
59  
60  	public void setRoleCode(String roleCode) {
61  		this.roleCode = roleCode;
62  	}
63  
64  	@Column(name = "ROLE_NAME", length = 120)
65  	public String getRoleName() {
66  		return roleName;
67  	}
68  
69  	public void setRoleName(String roleName) {
70  		this.roleName = roleName;
71  	}
72  
73  	@Column(name = "DESCRIPTION", length = 500)
74      public String getDescription() {
75      	return description;
76      }
77  	
78      public void setDescription(String description) {
79      	this.description = description;
80      }
81  	
82  	
83  }