/tests_bugs/com/google/appengine/datanucleus/bugs/test/Issue228Parent.java

http://datanucleus-appengine.googlecode.com/ · Java · 35 lines · 26 code · 9 blank · 0 comment · 0 complexity · a3444f05d35966a62fb2c2acebfa1783 MD5 · raw file

  1. package com.google.appengine.datanucleus.bugs.test;
  2. import java.util.HashSet;
  3. import java.util.Set;
  4. import javax.jdo.annotations.IdGeneratorStrategy;
  5. import javax.jdo.annotations.PersistenceCapable;
  6. import javax.jdo.annotations.Persistent;
  7. import javax.jdo.annotations.PrimaryKey;
  8. import com.google.appengine.api.datastore.Key;
  9. @PersistenceCapable
  10. public class Issue228Parent {
  11. @PrimaryKey
  12. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  13. Key id;
  14. String name;
  15. @Persistent(mappedBy="parent")
  16. Set<Issue228Child> children = new HashSet<Issue228Child>();
  17. public String getName() {
  18. return name;
  19. }
  20. public void setName(String str) {
  21. this.name = str;
  22. }
  23. public Set<Issue228Child> getChildren() {
  24. return children;
  25. }
  26. }