PageRenderTime 48ms CodeModel.GetById 27ms app.highlight 15ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 107 lines | 66 code | 23 blank | 18 comment | 0 complexity | 0712f330ec68e885d7c81fa1831d3a7c 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 HasOneToOneJDO {
 29
 30  @PrimaryKey
 31  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
 32  @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value="true")
 33  private String id;
 34
 35  @Persistent(dependent = "true")
 36  private Flight flight;
 37
 38  @Persistent(dependent = "true")
 39  private HasKeyPkJDO hasKeyPK;
 40
 41  @Persistent(dependent = "true")
 42  private HasOneToOneParentJDO hasParent;
 43
 44  @Persistent(dependent = "true")
 45  private HasOneToOneParentKeyPkJDO hasParentKeyPK;
 46
 47  @Persistent
 48  private HasEncodedStringPkJDO notDependent;
 49
 50  @Persistent String str;
 51
 52  public String getId() {
 53    return id;
 54  }
 55
 56  public void setId(String id) {
 57    this.id = id;
 58  }
 59
 60  public Flight getFlight() {
 61    return flight;
 62  }
 63
 64  public void setFlight(Flight flight) {
 65    this.flight = flight;
 66  }
 67
 68  public HasKeyPkJDO getHasKeyPK() {
 69    return hasKeyPK;
 70  }
 71
 72  public void setHasKeyPK(HasKeyPkJDO hasKeyPK) {
 73    this.hasKeyPK = hasKeyPK;
 74  }
 75
 76  public HasOneToOneParentJDO getHasParent() {
 77    return hasParent;
 78  }
 79
 80  public void setHasParent(HasOneToOneParentJDO hasParent) {
 81    this.hasParent = hasParent;
 82  }
 83
 84  public HasOneToOneParentKeyPkJDO getHasParentKeyPK() {
 85    return hasParentKeyPK;
 86  }
 87
 88  public void setHasParentKeyPK(HasOneToOneParentKeyPkJDO hasParentKeyPK) {
 89    this.hasParentKeyPK = hasParentKeyPK;
 90  }
 91
 92  public HasEncodedStringPkJDO getNotDependent() {
 93    return notDependent;
 94  }
 95
 96  public void setNotDependent(HasEncodedStringPkJDO notDependent) {
 97    this.notDependent = notDependent;
 98  }
 99
100  public String getStr() {
101    return str;
102  }
103
104  public void setStr(String str) {
105    this.str = str;
106  }
107}