Created
May 14, 2009 10:09
-
-
Save shin1ogawa/111599 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import javax.jdo.annotations.Extension; | |
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; | |
import com.google.appengine.api.datastore.Key; | |
@PersistenceCapable(identityType = IdentityType.APPLICATION) | |
public class Parent2 { | |
/** 主キー */ | |
@PrimaryKey | |
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) | |
@Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value = "true") | |
private String key; | |
/** 主キーの{@link Key#getId()}の値 */ | |
@Persistent | |
@Extension(vendorName = "datanucleus", key = "gae.pk-id", value = "true") | |
private Long id; | |
@Persistent | |
private List<Child2> children = new ArrayList<Child2>(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment