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

http://datanucleus-appengine.googlecode.com/ · Java · 175 lines · 115 code · 42 blank · 18 comment · 0 complexity · fec9e2ea4385da4c69e6e70d3adeb00d 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 com.google.appengine.api.datastore.ShortBlob;
  15. import java.util.Collection;
  16. import java.util.List;
  17. import java.util.Set;
  18. import javax.persistence.Basic;
  19. import javax.persistence.Entity;
  20. import javax.persistence.GeneratedValue;
  21. import javax.persistence.GenerationType;
  22. import javax.persistence.Id;
  23. import javax.persistence.Lob;
  24. /**
  25. * @author Max Ross <maxr@google.com>
  26. */
  27. @Entity
  28. public class HasBytesJPA {
  29. @Id
  30. @GeneratedValue(strategy= GenerationType.IDENTITY)
  31. private Long id;
  32. private byte onePrimByte;
  33. private Byte oneByte;
  34. private byte[] primBytes;
  35. private Byte[] bytes;
  36. @Basic
  37. private List<Byte> byteList;
  38. @Basic
  39. private Set<Byte> byteSet;
  40. @Basic
  41. private Collection<Byte> byteCollection;
  42. @Lob
  43. private byte[] serializedPrimBytes;
  44. @Lob
  45. private Byte[] serializedBytes;
  46. @Lob
  47. private List<Byte> serializedByteList;
  48. @Lob
  49. private Set<Byte> serializedByteSet;
  50. @Basic
  51. private ShortBlob shortBlob;
  52. public Long getId() {
  53. return id;
  54. }
  55. public void setId(Long id) {
  56. this.id = id;
  57. }
  58. public byte[] getPrimBytes() {
  59. return primBytes;
  60. }
  61. public void setPrimBytes(byte[] primBytes) {
  62. this.primBytes = primBytes;
  63. }
  64. public Byte[] getBytes() {
  65. return bytes;
  66. }
  67. public void setBytes(Byte[] bytes) {
  68. this.bytes = bytes;
  69. }
  70. public byte getOnePrimByte() {
  71. return onePrimByte;
  72. }
  73. public void setOnePrimByte(byte onePrimByte) {
  74. this.onePrimByte = onePrimByte;
  75. }
  76. public Byte getOneByte() {
  77. return oneByte;
  78. }
  79. public void setOneByte(Byte oneByte) {
  80. this.oneByte = oneByte;
  81. }
  82. public ShortBlob getShortBlob() {
  83. return shortBlob;
  84. }
  85. public void setShortBlob(ShortBlob shortBlob) {
  86. this.shortBlob = shortBlob;
  87. }
  88. public List<Byte> getByteList() {
  89. return byteList;
  90. }
  91. public void setByteList(List<Byte> byteList) {
  92. this.byteList = byteList;
  93. }
  94. public Set<Byte> getByteSet() {
  95. return byteSet;
  96. }
  97. public void setByteSet(Set<Byte> byteSet) {
  98. this.byteSet = byteSet;
  99. }
  100. public Collection<Byte> getByteCollection() {
  101. return byteCollection;
  102. }
  103. public void setByteCollection(Collection<Byte> byteCollection) {
  104. this.byteCollection = byteCollection;
  105. }
  106. public byte[] getSerializedPrimBytes() {
  107. return serializedPrimBytes;
  108. }
  109. public void setSerializedPrimBytes(byte[] serializedPrimBytes) {
  110. this.serializedPrimBytes = serializedPrimBytes;
  111. }
  112. public Byte[] getSerializedBytes() {
  113. return serializedBytes;
  114. }
  115. public void setSerializedBytes(Byte[] serializedBytes) {
  116. this.serializedBytes = serializedBytes;
  117. }
  118. public List<Byte> getSerializedByteList() {
  119. return serializedByteList;
  120. }
  121. public void setSerializedByteList(List<Byte> serializedByteList) {
  122. this.serializedByteList = serializedByteList;
  123. }
  124. public Set<Byte> getSerializedByteSet() {
  125. return serializedByteSet;
  126. }
  127. public void setSerializedByteSet(Set<Byte> serializedByteSet) {
  128. this.serializedByteSet = serializedByteSet;
  129. }
  130. }