PageRenderTime 85ms CodeModel.GetById 79ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

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