From c14913afcb0de726801241e6b66533b52bce78a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Fri, 3 Sep 2010 02:20:01 -0400 Subject: Minor improvements to the data objects --- src/lq/Vote.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/lq/Vote.java') 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,21 +2,19 @@ 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; @@ -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; } -- cgit v1.2.3