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

http://datanucleus-appengine.googlecode.com/ · Java · 80 lines · 47 code · 15 blank · 18 comment · 0 complexity · 46529a997c5138eb10d5ace6c8758ab4 MD5 · raw file

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