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

http://datanucleus-appengine.googlecode.com/ · Java · 40 lines · 30 code · 10 blank · 0 comment · 0 complexity · 6f41a9e754ccb48c3b810e5956fe63c3 MD5 · raw file

  1. package com.google.appengine.datanucleus.test;
  2. import javax.jdo.annotations.IdGeneratorStrategy;
  3. import javax.jdo.annotations.PersistenceCapable;
  4. import javax.jdo.annotations.Persistent;
  5. import javax.jdo.annotations.PrimaryKey;
  6. import com.google.appengine.api.datastore.Key;
  7. @PersistenceCapable
  8. public class Issue207Child implements Issue207ChildInterface {
  9. @PrimaryKey
  10. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  11. private Key id;
  12. String name;
  13. @Persistent(types=Issue207Parent.class)
  14. Issue207ParentInterface parent;
  15. public Issue207Child(String name) {
  16. this.name = name;
  17. }
  18. public void setParent(Issue207ParentInterface owner) {
  19. this.parent = owner;
  20. }
  21. public Issue207ParentInterface getParent() {
  22. return parent;
  23. }
  24. public String getName() {
  25. return name;
  26. }
  27. public Key getId() {
  28. return id;
  29. }
  30. }