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.entity;
017    
018    import java.util.Date;
019    
020    import javax.persistence.Column;
021    import javax.persistence.Embeddable;
022    import javax.persistence.Temporal;
023    import javax.persistence.TemporalType;
024    
025    @Embeddable
026    public class Meta {
027    
028    //      Hibernate will not allow @Version in @Embeddable for some annoying reason
029    //      @Version
030    //      private long versionInd;
031            
032    //      public long getVersionNumber() {
033    //          return versionInd;
034    //  }
035    //
036    //  public void setVersionInd(long versionInd) {
037    //          this.versionInd = versionInd;
038    //  }
039            
040            @Temporal(TemporalType.TIMESTAMP)
041            @Column(updatable=false)
042            private Date createTime;
043    
044            @Column(updatable=false)
045            private String createId;
046    
047            @Temporal(TemporalType.TIMESTAMP)
048            private Date updateTime;
049    
050            private String updateId;
051    
052            public Date getCreateTime() {
053                    return createTime;
054            }
055    
056            public void setCreateTime(Date createTime) {
057                    this.createTime = createTime;
058            }
059    
060            public String getCreateId() {
061                    return createId;
062            }
063    
064            public void setCreateId(String createId) {
065                    this.createId = createId;
066            }
067            
068            public Date getUpdateTime() {
069                    return updateTime;
070            }
071    
072            public void setUpdateTime(Date updateTime) {
073                    this.updateTime = updateTime;
074            }
075    
076            public String getUpdateId() {
077                    return updateId;
078            }
079    
080            public void setUpdateId(String updateId) {
081                    this.updateId = updateId;
082            }
083    }