1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.student.r1.common.assembly.helper;
17
18
19 import org.kuali.student.r1.common.assembly.data.Data;
20
21
22
23 @Deprecated
24 public class RuntimeDataHelper
25 {
26 private static final long serialVersionUID = 1;
27
28 public enum Properties implements PropertyEnum
29 {
30 CREATED ("created"),
31 DELETED ("deleted"),
32 UPDATED ("updated"),
33 VERSIONS ("versions");
34
35 private final String key;
36
37 private Properties (final String key)
38 {
39 this.key = key;
40 }
41
42 @Override
43 public String getKey ()
44 {
45 return this.key;
46 }
47 }
48 private Data data;
49
50 private RuntimeDataHelper (Data data)
51 {
52 this.data = data;
53 }
54
55 public static RuntimeDataHelper wrap (Data data)
56 {
57 if (data == null)
58 {
59 return null;
60 }
61 return new RuntimeDataHelper (data);
62 }
63
64 public Data getData ()
65 {
66 return data;
67 }
68
69
70 public void setCreated (Boolean value)
71 {
72 data.set (Properties.CREATED.getKey (), value);
73 }
74
75
76 public Boolean isCreated ()
77 {
78 return (Boolean) data.get (Properties.CREATED.getKey ());
79 }
80
81
82 public void setDeleted (Boolean value)
83 {
84 data.set (Properties.DELETED.getKey (), value);
85 }
86
87
88 public Boolean isDeleted ()
89 {
90 return (Boolean) data.get (Properties.DELETED.getKey ());
91 }
92
93
94 public void setUpdated (Boolean value)
95 {
96 data.set (Properties.UPDATED.getKey (), value);
97 }
98
99
100 public Boolean isUpdated ()
101 {
102 return (Boolean) data.get (Properties.UPDATED.getKey ());
103 }
104
105
106 public void setVersions (Data value)
107 {
108 data.set (Properties.VERSIONS.getKey (), value);
109 }
110
111
112 public Data getVersions ()
113 {
114 return (Data) data.get (Properties.VERSIONS.getKey ());
115 }
116
117 }
118