PageRenderTime 37ms CodeModel.GetById 18ms app.highlight 12ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://thoughtsite.googlecode.com/
Java | 125 lines | 58 code | 22 blank | 45 comment | 0 complexity | 592a4de6343a20cfa607c27729a94424 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.Inheritance;
 25import javax.jdo.annotations.InheritanceStrategy;
 26import javax.jdo.annotations.PersistenceCapable;
 27import javax.jdo.annotations.Persistent;
 28import javax.jdo.annotations.PrimaryKey;
 29
 30@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
 31@Inheritance(strategy = InheritanceStrategy.SUBCLASS_TABLE)
 32public abstract class Vote implements Serializable {
 33
 34    /** A unique identifier for the class */
 35    private static final long serialVersionUID = 8590211958439336159L;
 36
 37    @PrimaryKey
 38    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 39    @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true")
 40    private String key;
 41
 42    @Persistent
 43    private boolean positiveVote;
 44
 45    @Persistent
 46    private long votePoints;
 47
 48    @Persistent
 49    private Date votingDate;
 50
 51    @Persistent
 52    private String creatorKey;
 53
 54    /**
 55     * @return the creatorKey
 56     */
 57    public String getCreatorKey() {
 58        return creatorKey;
 59    }
 60
 61    /**
 62     * @param creatorKey the creatorKey to set
 63     */
 64    public void setCreatorKey(String creatorKey) {
 65        this.creatorKey = creatorKey;
 66    }
 67
 68    /**
 69     * @return the key
 70     */
 71    public String getKey() {
 72        return key;
 73    }
 74
 75    /**
 76     * @param key the key to set
 77     */
 78    public void setKey(String key) {
 79        this.key = key;
 80    }
 81
 82    /**
 83     * @return the positiveVote
 84     */
 85    public boolean isPositiveVote() {
 86        return positiveVote;
 87    }
 88
 89    /**
 90     * @param positiveVote the positiveVote to set
 91     */
 92    public void setPositiveVote(boolean positiveVote) {
 93        this.positiveVote = positiveVote;
 94    }
 95
 96    /**
 97     * @return the votePoints
 98     */
 99    public long getVotePoints() {
100        return votePoints;
101    }
102
103    /**
104     * @param votePoints the votePoints to set
105     */
106    public void setVotePoints(long votePoints) {
107        this.votePoints = votePoints;
108    }
109
110    /**
111     * @return the votingDate
112     */
113    public Date getVotingDate() {
114        return votingDate;
115    }
116
117    /**
118     * @param votingDate the votingDate to set
119     */
120    public void setVotingDate(Date votingDate) {
121        this.votingDate = votingDate;
122    }
123
124}
125