com.googlecode.objectify.test.entity.Child Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectify Show documentation
Show all versions of objectify Show documentation
*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore
The newest version!
/*
* $Id: BeanMixin.java 1075 2009-05-07 06:41:19Z lhoriman $
* $URL: https://subetha.googlecode.com/svn/branches/resin/rtest/src/org/subethamail/rtest/util/BeanMixin.java $
*/
package com.googlecode.objectify.test.entity;
import javax.persistence.Id;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.annotation.Cached;
import com.googlecode.objectify.annotation.Parent;
/**
* A child entity which references a parent in the same entity group.
*
* @author Jeff Schnitzer
*/
@Cached
public class Child
{
@Id Long id;
public Long getId() { return this.id; }
public void setId(Long value) { this.id = value; }
@Parent
Key parent;
public Key getParent() { return this.parent; }
public void setParent(Key value) { this.parent = value; }
String childString;
public String getChildString() { return this.childString; }
public void setChildString(String value) { this.childString = value; }
/** Default constructor must always exist */
public Child() {}
/** Constructor to use when autogenerating an id */
public Child(Key parent, String childString)
{
this.parent = parent;
this.childString = childString;
}
}