/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. /**********************************************************************
  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.Extension;
  15. import javax.jdo.annotations.IdGeneratorStrategy;
  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(detachable = "true")
  23. public class HasOneToOneJDO {
  24. @PrimaryKey
  25. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  26. @Extension(vendorName = "datanucleus", key = "gae.encoded-pk", value="true")
  27. private String id;
  28. @Persistent(dependent = "true")
  29. private Flight flight;
  30. @Persistent(dependent = "true")
  31. private HasKeyPkJDO hasKeyPK;
  32. @Persistent(dependent = "true")
  33. private HasOneToOneParentJDO hasParent;
  34. @Persistent(dependent = "true")
  35. private HasOneToOneParentKeyPkJDO hasParentKeyPK;
  36. @Persistent
  37. private HasEncodedStringPkJDO notDependent;
  38. @Persistent String str;
  39. public String getId() {
  40. return id;
  41. }
  42. public void setId(String id) {
  43. this.id = id;
  44. }
  45. public Flight getFlight() {
  46. return flight;
  47. }
  48. public void setFlight(Flight flight) {
  49. this.flight = flight;
  50. }
  51. public HasKeyPkJDO getHasKeyPK() {
  52. return hasKeyPK;
  53. }
  54. public void setHasKeyPK(HasKeyPkJDO hasKeyPK) {
  55. this.hasKeyPK = hasKeyPK;
  56. }
  57. public HasOneToOneParentJDO getHasParent() {
  58. return hasParent;
  59. }
  60. public void setHasParent(HasOneToOneParentJDO hasParent) {
  61. this.hasParent = hasParent;
  62. }
  63. public HasOneToOneParentKeyPkJDO getHasParentKeyPK() {
  64. return hasParentKeyPK;
  65. }
  66. public void setHasParentKeyPK(HasOneToOneParentKeyPkJDO hasParentKeyPK) {
  67. this.hasParentKeyPK = hasParentKeyPK;
  68. }
  69. public HasEncodedStringPkJDO getNotDependent() {
  70. return notDependent;
  71. }
  72. public void setNotDependent(HasEncodedStringPkJDO notDependent) {
  73. this.notDependent = notDependent;
  74. }
  75. public String getStr() {
  76. return str;
  77. }
  78. public void setStr(String str) {
  79. this.str = str;
  80. }
  81. }