PageRenderTime 61ms CodeModel.GetById 51ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/google/ie/business/domain/Audit.java

http://thoughtsite.googlecode.com/
Java | 135 lines | 71 code | 28 blank | 36 comment | 0 complexity | 432e6db6a23612069260e6e68b943811 MD5 | raw file
  1/* Copyright 2010 Google Inc.
  2 * 
  3 * Licensed under the Apache License, Version 2.0 (the "License");
  4 * you may not use this file except in compliance with the License.
  5 * You may obtain a copy of the License at
  6 * 
  7 *      http://www.apache.org/licenses/LICENSE-2.0
  8 * 
  9 * Unless required by applicable law or agreed to in writing, software
 10 * distributed under the License is distributed on an "AS IS" BASIS.
 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12 * See the License for the specific language governing permissions and
 13 * limitations under the License
 14 */
 15
 16package com.google.ie.business.domain;
 17
 18import java.io.Serializable;
 19import java.util.Date;
 20
 21import javax.jdo.annotations.Extension;
 22import javax.jdo.annotations.IdGeneratorStrategy;
 23import javax.jdo.annotations.IdentityType;
 24import javax.jdo.annotations.PersistenceCapable;
 25import javax.jdo.annotations.Persistent;
 26import javax.jdo.annotations.PrimaryKey;
 27
 28/**
 29 * 
 30 * @author abraina
 31 * 
 32 */
 33@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
 34public class Audit implements Serializable {
 35
 36    /** A unique identifier for the class */
 37    private static final long serialVersionUID = -6200216596199040053L;
 38
 39    @PrimaryKey
 40    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 41    @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
 42    private String key;
 43
 44    @Persistent
 45    private String action;
 46
 47    @Persistent
 48    private String entityKey;
 49
 50    @Persistent
 51    private String userKey;
 52
 53    @Persistent
 54    private String entityType;
 55
 56    @Persistent
 57    private Date auditDate;
 58
 59    public Audit() {
 60
 61    }
 62
 63    /**
 64     * @return the key
 65     */
 66    public String getKey() {
 67        return key;
 68    }
 69
 70    /**
 71     * @param key the key to set
 72     */
 73    public void setKey(String key) {
 74        this.key = key;
 75    }
 76
 77    public String getAction() {
 78        return action;
 79    }
 80
 81    public void setAction(String action) {
 82        this.action = action;
 83    }
 84
 85    public String getEntityKey() {
 86        return entityKey;
 87    }
 88
 89    public void setEntityKey(String entityKey) {
 90        this.entityKey = entityKey;
 91    }
 92
 93    public String getUserKey() {
 94        return userKey;
 95    }
 96
 97    public void setUserKey(String userKey) {
 98        this.userKey = userKey;
 99    }
100
101    public Date getAuditDate() {
102        return auditDate;
103    }
104
105    public void setAuditDate(Date auditDate) {
106        this.auditDate = auditDate;
107    }
108
109    /**
110     * @param entityType the entityType to set
111     */
112    public void setEntityType(String entityType) {
113        this.entityType = entityType;
114    }
115
116    /**
117     * @return the entityType
118     */
119    public String getEntityType() {
120        return entityType;
121    }
122
123    /*
124     * (non-Javadoc)
125     * @see java.lang.Object#toString()
126     */
127    @Override
128    public String toString() {
129        return "Audit [action=" + action + ", auditDate=" + auditDate + ", entityKey=" + entityKey
130                        + ", entityType=" + entityType + ", key=" + key + ", userKey=" + userKey
131                        + "]";
132    }
133
134}
135