View Javadoc
1   package org.kuali.mobility.tours.entity;
2   
3   import javax.persistence.Basic;
4   import javax.persistence.Column;
5   import javax.persistence.Entity;
6   import javax.persistence.FetchType;
7   import javax.persistence.GeneratedValue;
8   import javax.persistence.GenerationType;
9   import javax.persistence.Id;
10  import javax.persistence.JoinColumn;
11  import javax.persistence.OneToOne;
12  import javax.persistence.SequenceGenerator;
13  import javax.persistence.Table;
14  
15  @Entity(name="POIPermission")
16  @Table(name="TOUR_POI_PRMSSN_T")
17  public class POIPermission {
18  
19  	@Id
20      //@SequenceGenerator(name="tour_poi_permission_sequence", sequenceName="SEQ_TOUR_POI_PRMSSN_T", initialValue=1000, allocationSize=1)
21      //@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="tour_poi_permission_sequence")
22  	@GeneratedValue(strategy = GenerationType.TABLE)
23      @Column(name="PRMSSN_ID")
24  	private Long permissionId;
25  	
26  	@Basic
27      @Column(name="POI_ID", insertable=false, updatable=false)
28  	private Long poiId;
29  
30      @OneToOne(fetch=FetchType.LAZY)
31      @JoinColumn(name="POI_ID", nullable=true)
32  	private POI poi;
33      
34      @Column(name="PRMSSN_TYPE")
35  	private String type;
36      
37      @Column(name="GRP_NM")
38  	private String groupName;
39  
40  	public POIPermission copy(boolean includeIds) {
41  		POIPermission copy = new POIPermission();
42  		if (includeIds) {
43  			copy.setPermissionId(new Long(permissionId));
44  		}
45  		copy.setPoiId(new Long(poiId));
46  		copy.setType(new String(type));
47  		copy.setGroupName(new String(groupName));
48  		return copy;
49  	}
50  
51  	public Long getPoiId() {
52  		return poiId;
53  	}
54  
55  	public void setPoiId(Long poiId) {
56  		this.poiId = poiId;
57  	}
58  
59  	public POI getPoi() {
60  		return poi;
61  	}
62  
63  	public void setPoi(POI poi) {
64  		this.poi = poi;
65  	}
66  
67  	public String getType() {
68  		return type;
69  	}
70  
71  	public void setType(String type) {
72  		this.type = type;
73  	}
74  
75  	public String getGroupName() {
76  		return groupName;
77  	}
78  
79  	public void setGroupName(String groupName) {
80  		this.groupName = groupName;
81  	}
82  	
83  	public Long getPermissionId() {
84  		return permissionId;
85  	}
86  
87  	public void setPermissionId(Long permissionId) {
88  		this.permissionId = permissionId;
89  	}
90  }