PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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