PageRenderTime 37ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

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

http://datanucleus-appengine.googlecode.com/
Java | 173 lines | 116 code | 39 blank | 18 comment | 0 complexity | 53557c7462d3f65fc5d563a8dfb028db MD5 | raw file
Possible License(s): Apache-2.0
  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 com.google.appengine.api.datastore.Key;
  15. import java.util.ArrayList;
  16. import java.util.Collection;
  17. import java.util.HashSet;
  18. import java.util.LinkedHashSet;
  19. import java.util.LinkedList;
  20. import java.util.List;
  21. import java.util.Set;
  22. import java.util.SortedSet;
  23. import java.util.TreeSet;
  24. import javax.jdo.annotations.IdGeneratorStrategy;
  25. import javax.jdo.annotations.IdentityType;
  26. import javax.jdo.annotations.PersistenceCapable;
  27. import javax.jdo.annotations.Persistent;
  28. import javax.jdo.annotations.PrimaryKey;
  29. /**
  30. * @author Max Ross <maxr@google.com>
  31. */
  32. @PersistenceCapable(identityType = IdentityType.APPLICATION)
  33. public class HasMultiValuePropsJDO {
  34. @PrimaryKey
  35. @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  36. private Long id;
  37. @Persistent
  38. String str;
  39. @Persistent(defaultFetchGroup = "true")
  40. List<String> strList;
  41. @Persistent(defaultFetchGroup = "true")
  42. Collection<Integer> intColl;
  43. @Persistent
  44. List<Key> keyList;
  45. @Persistent(defaultFetchGroup = "true")
  46. Set<String> strSet;
  47. @Persistent(defaultFetchGroup = "true")
  48. HashSet<String> strHashSet;
  49. @Persistent(defaultFetchGroup = "true")
  50. TreeSet<String> strTreeSet;
  51. @Persistent(defaultFetchGroup = "true")
  52. ArrayList<String> strArrayList;
  53. @Persistent(defaultFetchGroup = "true")
  54. LinkedList<String> strLinkedList;
  55. @Persistent(defaultFetchGroup = "true")
  56. SortedSet<String> strSortedSet;
  57. @Persistent(defaultFetchGroup = "true")
  58. LinkedHashSet<String> strLinkedHashSet;
  59. public Long getId() {
  60. return id;
  61. }
  62. public void setId(Long id) {
  63. this.id = id;
  64. }
  65. public List<String> getStrList() {
  66. return strList;
  67. }
  68. public void setStrList(List<String> strList) {
  69. this.strList = strList;
  70. }
  71. public List<Key> getKeyList() {
  72. return keyList;
  73. }
  74. public void setKeyList(List<Key> keyList) {
  75. this.keyList = keyList;
  76. }
  77. public String getStr() {
  78. return str;
  79. }
  80. public void setStr(String s) {
  81. this.str = s;
  82. }
  83. public Set<String> getStrSet() {
  84. return strSet;
  85. }
  86. public void setStrSet(Set<String> strSet) {
  87. this.strSet = strSet;
  88. }
  89. public TreeSet<String> getStrTreeSet() {
  90. return strTreeSet;
  91. }
  92. public void setStrTreeSet(TreeSet<String> strTreeSet) {
  93. this.strTreeSet = strTreeSet;
  94. }
  95. public ArrayList<String> getStrArrayList() {
  96. return strArrayList;
  97. }
  98. public void setStrArrayList(ArrayList<String> strArrayList) {
  99. this.strArrayList = strArrayList;
  100. }
  101. public LinkedList<String> getStrLinkedList() {
  102. return strLinkedList;
  103. }
  104. public void setStrLinkedList(LinkedList<String> strLinkedList) {
  105. this.strLinkedList = strLinkedList;
  106. }
  107. public HashSet<String> getStrHashSet() {
  108. return strHashSet;
  109. }
  110. public void setStrHashSet(HashSet<String> strHashSet) {
  111. this.strHashSet = strHashSet;
  112. }
  113. public SortedSet<String> getStrSortedSet() {
  114. return strSortedSet;
  115. }
  116. public void setStrSortedSet(SortedSet<String> strSortedSet) {
  117. this.strSortedSet = strSortedSet;
  118. }
  119. public LinkedHashSet<String> getStrLinkedHashSet() {
  120. return strLinkedHashSet;
  121. }
  122. public void setStrLinkedHashSet(LinkedHashSet<String> strLinkedHashSet) {
  123. this.strLinkedHashSet = strLinkedHashSet;
  124. }
  125. public Collection<Integer> getIntColl() {
  126. return intColl;
  127. }
  128. public void setIntColl(Collection<Integer> intColl) {
  129. this.intColl = intColl;
  130. }
  131. }