View Javadoc

1   /*
2    * Copyright 2010 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may	obtain a copy of the License at
7    *
8    * 	http://www.osedu.org/licenses/ECL-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.student.lum.common.client.lo;
17  
18  
19  import java.util.Date;
20  
21  import org.kuali.student.r1.common.assembly.data.Data;
22  import org.kuali.student.r1.common.assembly.helper.PropertyEnum;
23  
24  
25  public class MetaInfoHelper
26  {
27  	private static final long serialVersionUID = 1;
28  	
29  	public enum Properties implements PropertyEnum
30  	{
31  		VERSION_IND ("versionInd"),
32  		CREATE_TIME ("createTime"),
33  		CREATE_ID ("createId"),
34  		UPDATE_TIME ("updateTime"),
35  		UPDATE_ID ("updateId");
36  		
37  		private final String key;
38  		
39  		private Properties (final String key)
40  		{
41  			this.key = key;
42  		}
43  		
44  		@Override
45  		public String getKey ()
46  		{
47  			return this.key;
48  		}
49  	}
50  	private Data data;
51  	
52  	private MetaInfoHelper (Data data)
53  	{
54  		this.data = data;
55  	}
56  	
57  	public static MetaInfoHelper wrap (Data data)
58  	{
59  		if (data == null)
60  		{
61  			 return null;
62  		}
63  		return new MetaInfoHelper (data);
64  	}
65  	
66  	public Data getData ()
67  	{
68  		return data;
69  	}
70  	
71  	
72  	public void setVersionInd (String value)
73  	{
74  		data.set (Properties.VERSION_IND.getKey (), value);
75  	}
76  	
77  	
78  	public String getVersionInd ()
79  	{
80  		return (String) data.get (Properties.VERSION_IND.getKey ());
81  	}
82  	
83  	
84  	public void setCreateTime (Date value)
85  	{
86  		data.set (Properties.CREATE_TIME.getKey (), value);
87  	}
88  	
89  	
90  	public Date getCreateTime ()
91  	{
92  		return (Date) data.get (Properties.CREATE_TIME.getKey ());
93  	}
94  	
95  	
96  	public void setCreateId (String value)
97  	{
98  		data.set (Properties.CREATE_ID.getKey (), value);
99  	}
100 	
101 	
102 	public String getCreateId ()
103 	{
104 		return (String) data.get (Properties.CREATE_ID.getKey ());
105 	}
106 	
107 	
108 	public void setUpdateTime (Date value)
109 	{
110 		data.set (Properties.UPDATE_TIME.getKey (), value);
111 	}
112 	
113 	
114 	public Date getUpdateTime ()
115 	{
116 		return (Date) data.get (Properties.UPDATE_TIME.getKey ());
117 	}
118 	
119 	
120 	public void setUpdateId (String value)
121 	{
122 		data.set (Properties.UPDATE_ID.getKey (), value);
123 	}
124 	
125 	
126 	public String getUpdateId ()
127 	{
128 		return (String) data.get (Properties.UPDATE_ID.getKey ());
129 	}
130 	
131 }
132