1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.mobility.admin.entity; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
import java.util.Arrays; |
21 | |
import java.util.List; |
22 | |
|
23 | |
import javax.persistence.CascadeType; |
24 | |
import javax.persistence.Column; |
25 | |
import javax.persistence.Entity; |
26 | |
import javax.persistence.FetchType; |
27 | |
import javax.persistence.GeneratedValue; |
28 | |
import javax.persistence.GenerationType; |
29 | |
import javax.persistence.Id; |
30 | |
import javax.persistence.OneToMany; |
31 | |
import javax.persistence.Table; |
32 | |
import javax.persistence.Version; |
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
@Entity |
39 | |
@Table(name="KME_HM_SCRN_T") |
40 | |
public class HomeScreen implements Serializable { |
41 | |
|
42 | |
private static final long serialVersionUID = 4947101996672004361L; |
43 | |
|
44 | |
@Id |
45 | |
@GeneratedValue(strategy = GenerationType.TABLE) |
46 | |
@Column(name="ID") |
47 | |
private Long homeScreenId; |
48 | |
|
49 | |
@Column(name="ALIAS") |
50 | |
private String alias; |
51 | |
|
52 | |
@Column(name="TTL") |
53 | |
private String title; |
54 | |
|
55 | |
@OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL, mappedBy="homeScreen") |
56 | |
private List<HomeTool> homeTools; |
57 | |
|
58 | |
@Version |
59 | |
@Column(name="VER_NBR") |
60 | |
private Long versionNumber; |
61 | |
|
62 | 0 | public HomeScreen() { |
63 | 0 | homeTools = new ArrayList<HomeTool>(); |
64 | 0 | } |
65 | |
|
66 | |
|
67 | |
|
68 | |
|
69 | |
public List<HomeTool> getHomeTools() { |
70 | 0 | return homeTools; |
71 | |
} |
72 | |
|
73 | |
|
74 | |
|
75 | |
|
76 | |
|
77 | |
public void setHomeTools(List<HomeTool> homeTools) { |
78 | 0 | this.homeTools = homeTools; |
79 | 0 | } |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | |
|
85 | |
public void setHomeTools(HomeTool[] homeTools) { |
86 | 0 | this.homeTools = Arrays.asList(homeTools); |
87 | 0 | } |
88 | |
|
89 | |
public Long getHomeScreenId() { |
90 | 0 | return homeScreenId; |
91 | |
} |
92 | |
|
93 | |
public void setHomeScreenId(Long homeScreenId) { |
94 | 0 | this.homeScreenId = homeScreenId; |
95 | 0 | } |
96 | |
|
97 | |
public String getAlias() { |
98 | 0 | return alias; |
99 | |
} |
100 | |
|
101 | |
public void setAlias(String alias) { |
102 | 0 | this.alias = alias; |
103 | 0 | } |
104 | |
|
105 | |
public String getTitle() { |
106 | 0 | return title; |
107 | |
} |
108 | |
|
109 | |
public void setTitle(String title) { |
110 | 0 | this.title = title; |
111 | 0 | } |
112 | |
|
113 | |
public Long getVersionNumber() { |
114 | 0 | return versionNumber; |
115 | |
} |
116 | |
|
117 | |
public void setVersionNumber(Long versionNumber) { |
118 | 0 | this.versionNumber = versionNumber; |
119 | 0 | } |
120 | |
|
121 | |
} |