001    /**
002     * Copyright 2010 The Kuali Foundation Licensed under the
003     * Educational Community License, Version 2.0 (the "License"); you may
004     * not use this file except in compliance with the License. You may
005     * obtain a copy of the License at
006     *
007     * http://www.osedu.org/licenses/ECL-2.0
008     *
009     * Unless required by applicable law or agreed to in writing,
010     * software distributed under the License is distributed on an "AS IS"
011     * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012     * or implied. See the License for the specific language governing
013     * permissions and limitations under the License.
014     */
015    
016    package org.kuali.student.common_test_tester.support;
017    
018    import java.util.Date;
019    
020    import javax.persistence.Entity;
021    import javax.persistence.Id;
022    import javax.persistence.PrePersist;
023    import javax.persistence.Temporal;
024    import javax.persistence.TemporalType;
025    
026    import org.kuali.student.common.test.spring.Idable;
027    import org.kuali.student.common.util.UUIDHelper;
028    
029    @Entity
030    public class Value implements Idable{
031            @Id
032            private String id;
033    
034            private String value;
035    
036            @Temporal(TemporalType.TIMESTAMP)
037            private Date createDate;
038            
039            /**
040             * AutoGenerate the Id
041             */
042            @PrePersist
043            public void prePersist() {
044                    this.id = UUIDHelper.genStringUUID(this.id);
045            }
046    
047            /**
048             * 
049             */
050            public Value() {
051                    super();
052            }
053    
054            /**
055             * @param value
056             */
057            public Value(String value) {
058                    super();
059                    this.value = value;
060            }
061    
062            /**
063             * @return the id
064             */
065            public String getId() {
066                    return id;
067            }
068    
069            /**
070             * @param id
071             *            the id to set
072             */
073            public void setId(String id) {
074                    this.id = id;
075            }
076    
077            /**
078             * @return the value
079             */
080            public String getValue() {
081                    return value;
082            }
083    
084            /**
085             * @param value
086             *            the value to set
087             */
088            public void setValue(String value) {
089                    this.value = value;
090            }
091    
092    
093            public Date getCreateDate() {
094                    return createDate;
095            }
096    
097            public void setCreateDate(Date createDate) {
098                    this.createDate = createDate;
099            }
100    }