PageRenderTime 37ms CodeModel.GetById 29ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 60 lines | 32 code | 10 blank | 18 comment | 0 complexity | ead2dbad3be1dfd7222d59bc5b0d493f 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 com.google.appengine.api.datastore.Key;
19
20import javax.persistence.Entity;
21import javax.persistence.FetchType;
22import javax.persistence.GeneratedValue;
23import javax.persistence.GenerationType;
24import javax.persistence.Id;
25import javax.persistence.OneToOne;
26
27/**
28 * @author Max Ross <maxr@google.com>
29 */
30@Entity
31public class HasOneToOneStringPkParentKeyPkJPA {
32  @Id
33  @GeneratedValue(strategy=GenerationType.IDENTITY)
34  private Key id;
35
36  @OneToOne(mappedBy = "hasParentKeyPK", fetch = FetchType.LAZY)
37  private HasOneToOneStringPkJPA parent;
38
39  private String str;
40
41  public Key getId() {
42    return id;
43  }
44
45  public HasOneToOneStringPkJPA getParent() {
46    return parent;
47  }
48
49  public void setParent(HasOneToOneStringPkJPA parent) {
50    this.parent = parent;
51  }
52
53  public String getStr() {
54    return str;
55  }
56
57  public void setStr(String str) {
58    this.str = str;
59  }
60}