/tests/com/google/appengine/datanucleus/test/HasBytesJPA.java
Java | 175 lines | 115 code | 42 blank | 18 comment | 0 complexity | fec9e2ea4385da4c69e6e70d3adeb00d MD5 | raw file
1/********************************************************************** 2Copyright (c) 2009 Google Inc. 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15**********************************************************************/ 16package com.google.appengine.datanucleus.test; 17 18import com.google.appengine.api.datastore.ShortBlob; 19 20import java.util.Collection; 21import java.util.List; 22import java.util.Set; 23 24import javax.persistence.Basic; 25import javax.persistence.Entity; 26import javax.persistence.GeneratedValue; 27import javax.persistence.GenerationType; 28import javax.persistence.Id; 29import javax.persistence.Lob; 30 31/** 32 * @author Max Ross <maxr@google.com> 33 */ 34@Entity 35public class HasBytesJPA { 36 37 @Id 38 @GeneratedValue(strategy= GenerationType.IDENTITY) 39 private Long id; 40 41 private byte onePrimByte; 42 private Byte oneByte; 43 44 private byte[] primBytes; 45 46 private Byte[] bytes; 47 48 @Basic 49 private List<Byte> byteList; 50 51 @Basic 52 private Set<Byte> byteSet; 53 54 @Basic 55 private Collection<Byte> byteCollection; 56 57 @Lob 58 private byte[] serializedPrimBytes; 59 60 @Lob 61 private Byte[] serializedBytes; 62 63 @Lob 64 private List<Byte> serializedByteList; 65 66 @Lob 67 private Set<Byte> serializedByteSet; 68 69 @Basic 70 private ShortBlob shortBlob; 71 72 public Long getId() { 73 return id; 74 } 75 76 public void setId(Long id) { 77 this.id = id; 78 } 79 80 public byte[] getPrimBytes() { 81 return primBytes; 82 } 83 84 public void setPrimBytes(byte[] primBytes) { 85 this.primBytes = primBytes; 86 } 87 88 public Byte[] getBytes() { 89 return bytes; 90 } 91 92 public void setBytes(Byte[] bytes) { 93 this.bytes = bytes; 94 } 95 96 public byte getOnePrimByte() { 97 return onePrimByte; 98 } 99 100 public void setOnePrimByte(byte onePrimByte) { 101 this.onePrimByte = onePrimByte; 102 } 103 104 public Byte getOneByte() { 105 return oneByte; 106 } 107 108 public void setOneByte(Byte oneByte) { 109 this.oneByte = oneByte; 110 } 111 112 public ShortBlob getShortBlob() { 113 return shortBlob; 114 } 115 116 public void setShortBlob(ShortBlob shortBlob) { 117 this.shortBlob = shortBlob; 118 } 119 120 public List<Byte> getByteList() { 121 return byteList; 122 } 123 124 public void setByteList(List<Byte> byteList) { 125 this.byteList = byteList; 126 } 127 128 public Set<Byte> getByteSet() { 129 return byteSet; 130 } 131 132 public void setByteSet(Set<Byte> byteSet) { 133 this.byteSet = byteSet; 134 } 135 136 public Collection<Byte> getByteCollection() { 137 return byteCollection; 138 } 139 140 public void setByteCollection(Collection<Byte> byteCollection) { 141 this.byteCollection = byteCollection; 142 } 143 144 public byte[] getSerializedPrimBytes() { 145 return serializedPrimBytes; 146 } 147 148 public void setSerializedPrimBytes(byte[] serializedPrimBytes) { 149 this.serializedPrimBytes = serializedPrimBytes; 150 } 151 152 public Byte[] getSerializedBytes() { 153 return serializedBytes; 154 } 155 156 public void setSerializedBytes(Byte[] serializedBytes) { 157 this.serializedBytes = serializedBytes; 158 } 159 160 public List<Byte> getSerializedByteList() { 161 return serializedByteList; 162 } 163 164 public void setSerializedByteList(List<Byte> serializedByteList) { 165 this.serializedByteList = serializedByteList; 166 } 167 168 public Set<Byte> getSerializedByteSet() { 169 return serializedByteSet; 170 } 171 172 public void setSerializedByteSet(Set<Byte> serializedByteSet) { 173 this.serializedByteSet = serializedByteSet; 174 } 175}