package com.codingbrothers.futurimages.domain;

import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Unindex;

@Entity
@Unindex
//@Cache(expirationSeconds=1)
public class Image {

	@Id private String id;
}

@@ -54,214 +54,657 @@
 ort 
-com.googlecode.objectify.annotation.Cache;%0D%0Aimport com.googlecode.objectify.annotation.Entity;%0D%0Aimport com.googlecode.objectify.annotation.Id;%0D%0Aimport com.googlecode.objectify.annotation.Unindex;%0D%0A%0D%0A@Entity
+java.util.Date;%0D%0A%0D%0Aimport javax.inject.Inject;%0D%0A%0D%0Aimport com.codingbrothers.futurimages.util.TrueToNullTranslator;%0D%0Aimport com.googlecode.objectify.Ref;%0D%0Aimport com.googlecode.objectify.annotation.Entity;%0D%0Aimport com.googlecode.objectify.annotation.Id;%0D%0Aimport com.googlecode.objectify.annotation.IgnoreSave;%0D%0Aimport com.googlecode.objectify.annotation.Index;%0D%0Aimport com.googlecode.objectify.annotation.Parent;%0D%0Aimport com.googlecode.objectify.annotation.Translate;%0D%0Aimport com.googlecode.objectify.annotation.Unindex;%0D%0Aimport com.googlecode.objectify.condition.IfFalse;%0D%0Aimport com.googlecode.objectify.condition.IfNull;%0D%0A%0D%0A@Entity(name = %22Image%22)
 %0D%0A@U
@@ -713,16 +713,17 @@
 ndex%0D%0A//
+ 
 @Cache(e
@@ -742,10 +742,13 @@
 onds
-=1
+ = 60
 )%0D%0Ap
@@ -776,29 +776,899 @@
 %0D%0A%09@
-Id private String id;
+Parent%0D%0A%09private Ref%3CUser%3E user;%0D%0A%0D%0A%09@Id%0D%0A%09private Long id;%0D%0A%0D%0A%09@Index%0D%0A%09@IgnoreSave(%7BIfNull.class, IfFalse.class%7D)%0D%0A%09@Translate(early = true, value = TrueToNullTranslator.class)%0D%0A%09private Boolean p = Boolean.FALSE;%0D%0A%0D%0A%09@Index%0D%0A%09private Date c;%0D%0A%0D%0A%09private String blobKey;%0D%0A%0D%0A%09@Inject%0D%0A%09private Image() %7B%7D%0D%0A%0D%0A%09public String getBlobKey() %7B%0D%0A%09%09return blobKey;%0D%0A%09%7D%0D%0A%0D%0A%09// hashCode, equals, toString%0D%0A%0D%0A%09public static class Builder %7B%0D%0A%0D%0A%09%09private Image image;%0D%0A%0D%0A%09%09public Builder() %7B%0D%0A%09%09%09image = new Image();%0D%0A%09%09%7D%0D%0A%0D%0A%09%09public Image build() %7B%0D%0A%09%09%09return image;%0D%0A%09%09%7D%0D%0A%0D%0A%09%09public Builder fromImage(Image image) %7B%0D%0A%09%09%09this.image.user = image.user;%0D%0A%09%09%09this.image.id = image.id;%0D%0A%09%09%09this.image.p = image.p;%0D%0A%09%09%09this.image.c = image.c;%0D%0A%09%09%09this.image.blobKey = image.blobKey;%0D%0A%09%09%09return this;%0D%0A%09%09%7D%0D%0A%0D%0A%09%09public Builder setBlobKey(String blobKey) %7B%0D%0A%09%09%09image.blobKey = blobKey;%0D%0A%09%09%09return this;%0D%0A%09%09%7D%0D%0A%09%7D
 %0D%0A%7D%0D

Update Image