PageRenderTime 33ms CodeModel.GetById 28ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 1ms

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

http://datanucleus-appengine.googlecode.com/
Java | 89 lines | 54 code | 17 blank | 18 comment | 0 complexity | 65f08c92db7f579d722fb8690e6b38b3 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.persistence.CascadeType;
19import javax.persistence.Entity;
20import javax.persistence.FetchType;
21import javax.persistence.Id;
22import javax.persistence.JoinColumn;
23import javax.persistence.OneToOne;
24
25/**
26 * @author Max Ross <maxr@google.com>
27 */
28@Entity
29public class HasOneToOneStringPkJPA {
30
31  @Id
32  private String id;
33
34  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
35  @JoinColumn(name = "book_id")
36  private Book book;
37
38  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
39  @JoinColumn(name = "haskeypk_id")
40  private HasKeyPkJPA hasKeyPK;
41
42  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
43  @JoinColumn(name = "hasparent_id")
44  private HasOneToOneStringPkParentJPA hasParent;
45
46  @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
47  @JoinColumn(name = "hasparentkeypk_id")
48  private HasOneToOneStringPkParentKeyPkJPA hasParentKeyPK;
49
50  public String getId() {
51    return id;
52  }
53
54  public void setId(String id) {
55    this.id = id;
56  }
57
58  public Book getBook() {
59    return book;
60  }
61
62  public void setBook(Book book) {
63    this.book = book;
64  }
65
66  public HasKeyPkJPA getHasKeyPK() {
67    return hasKeyPK;
68  }
69
70  public void setHasKeyPK(HasKeyPkJPA hasKeyPK) {
71    this.hasKeyPK = hasKeyPK;
72  }
73
74  public HasOneToOneStringPkParentJPA getHasParent() {
75    return hasParent;
76  }
77
78  public void setHasParent(HasOneToOneStringPkParentJPA hasParent) {
79    this.hasParent = hasParent;
80  }
81
82  public HasOneToOneStringPkParentKeyPkJPA getHasParentKeyPK() {
83    return hasParentKeyPK;
84  }
85
86  public void setHasParentKeyPK(HasOneToOneStringPkParentKeyPkJPA hasParentKeyPK) {
87    this.hasParentKeyPK = hasParentKeyPK;
88  }
89}