diff options
author | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2010-09-03 02:20:01 -0400 |
---|---|---|
committer | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2010-09-03 02:20:01 -0400 |
commit | c14913afcb0de726801241e6b66533b52bce78a6 (patch) | |
tree | 271cb972b559a2180784e278f9e8a44fe840a4e5 /src/lq/Vote.java | |
parent | 1fb83a8c3edefbc2a43d26cc6db835e592d65934 (diff) |
Minor improvements to the data objects
Diffstat (limited to 'src/lq/Vote.java')
-rw-r--r-- | src/lq/Vote.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lq/Vote.java b/src/lq/Vote.java index 65bdf6c..e566ac5 100644 --- a/src/lq/Vote.java +++ b/src/lq/Vote.java @@ -2,22 +2,20 @@ package lq; import com.google.appengine.api.datastore.Key; import java.util.Date; +import javax.jdo.annotations.EmbeddedOnly; import javax.jdo.annotations.IdGeneratorStrategy; import javax.jdo.annotations.IdentityType; import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; -@PersistenceCapable(identityType = IdentityType.APPLICATION) +@PersistenceCapable public class Vote { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent - private Quote quote; - - @Persistent private Long rating; @Persistent @@ -27,20 +25,17 @@ public class Vote { private String ip; public Vote(Long rating, String ip) { - this.quote = quote; this.ip = ip; this.rating = rating; timestamp = new Date(); } public Key getKey() { return key; } - public Quote getQuote() { return quote; } public Date getTimestamp() { return timestamp; } public String getIp() { return ip; } public Long getRating() { return rating; } public void setKey(Key key) { this.key = key; } - public void setQuote(Quote quote) { this.quote = quote; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } public void setIp(String ip) { this.ip = ip; } public void setRating(Long rating) { this.rating = rating; } |