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