PageRenderTime 28ms CodeModel.GetById 15ms app.highlight 8ms RepoModel.GetById 2ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 58 lines | 31 code | 9 blank | 18 comment | 0 complexity | 665a349d1d69d30762f83e857811d892 MD5 | raw file
 1/**********************************************************************
 2Copyright (c) 2009 Google Inc.
 3
 4Licensed under the Apache License, Version 2.0 (the "License");
 5you may not use this file except in compliance with the License.
 6You may obtain a copy of the License at
 7
 8http://www.apache.org/licenses/LICENSE-2.0
 9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15**********************************************************************/
16package com.google.appengine.datanucleus.test;
17
18import javax.jdo.annotations.Extension;
19import javax.jdo.annotations.IdGeneratorStrategy;
20import javax.jdo.annotations.PersistenceCapable;
21import javax.jdo.annotations.Persistent;
22import javax.jdo.annotations.PrimaryKey;
23
24/**
25 * @author Max Ross <maxr@google.com>
26 */
27@PersistenceCapable(detachable = "true")
28public class HasOneToOneParentJDO {
29  @PrimaryKey
30  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
31  @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value="true")
32  private String key;
33
34  @Persistent(mappedBy = "hasParent")
35  private HasOneToOneJDO parent;
36
37  private String str;
38
39  public String getKey() {
40    return key;
41  }
42
43  public HasOneToOneJDO getParent() {
44    return parent;
45  }
46
47  public void setParent(HasOneToOneJDO parent) {
48    this.parent = parent;
49  }
50
51  public String getStr() {
52    return str;
53  }
54
55  public void setStr(String str) {
56    this.str = str;
57  }
58}