PageRenderTime 77ms CodeModel.GetById 69ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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

http://datanucleus-appengine.googlecode.com/
Java | 59 lines | 32 code | 9 blank | 18 comment | 0 complexity | 5941271ff05e7279b61371fd2cd4b291 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.IdentityType;
21import javax.jdo.annotations.PersistenceCapable;
22import javax.jdo.annotations.Persistent;
23import javax.jdo.annotations.PrimaryKey;
24
25/**
26 * @author Max Ross <maxr@google.com>
27 */
28@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
29public class HasOneToOneLongPkParentJDO {
30  @PrimaryKey
31  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
32  @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value="true")
33  private String key;
34
35  @Persistent(mappedBy = "hasParent")
36  private HasOneToOneLongPkJDO parent;
37
38  private String str;
39
40  public String getKey() {
41    return key;
42  }
43
44  public HasOneToOneLongPkJDO getParent() {
45    return parent;
46  }
47
48  public void setParent(HasOneToOneLongPkJDO parent) {
49    this.parent = parent;
50  }
51
52  public String getStr() {
53    return str;
54  }
55
56  public void setStr(String str) {
57    this.str = str;
58  }
59}