/tests/com/google/appengine/datanucleus/test/Issue207Parent.java

http://datanucleus-appengine.googlecode.com/ · Java · 42 lines · 32 code · 10 blank · 0 comment · 0 complexity · bcae87900673648aa3f018ed10cf0f13 MD5 · raw file

  1. package com.google.appengine.datanucleus.test;
  2. import java.util.HashSet;
  3. import java.util.Set;
  4. import javax.jdo.annotations.Extension;
  5. import javax.jdo.annotations.IdGeneratorStrategy;
  6. import javax.jdo.annotations.PersistenceCapable;
  7. import javax.jdo.annotations.Persistent;
  8. import javax.jdo.annotations.PrimaryKey;
  9. import com.google.appengine.api.datastore.Key;
  10. @PersistenceCapable
  11. public class Issue207Parent implements Issue207ParentInterface {
  12. @PrimaryKey
  13. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  14. private Key id;
  15. String name;
  16. @Persistent(mappedBy="parent")
  17. @Extension(vendorName = "datanucleus", key = "implementation-classes",
  18. value = "com.google.appengine.datanucleus.test.Issue207Child")
  19. private Set<Issue207ChildInterface> children = new HashSet<Issue207ChildInterface>();
  20. public Issue207Parent(String name) {
  21. this.name = name;
  22. }
  23. public Set<Issue207ChildInterface> getChildren() {
  24. return children;
  25. }
  26. public String getName() {
  27. return name;
  28. }
  29. public Key getId() {
  30. return id;
  31. }
  32. }