KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > type > PrimitiveByteArrayBlobType


1 //$Id: PrimitiveByteArrayBlobType.java,v 1.2 2005/07/25 06:43:41 epbernard Exp $
2
package org.hibernate.type;
3
4 /**
5  * Map a byte[] to a Blob
6  *
7  * @author Emmanuel Bernard
8  */

9 public class PrimitiveByteArrayBlobType extends ByteArrayBlobType {
10     public Class JavaDoc getReturnedClass() {
11         return byte[].class;
12     }
13
14     protected Object JavaDoc wrap(byte[] bytes) {
15         return bytes;
16     }
17
18     protected byte[] unWrap(Object JavaDoc bytes) {
19         return ( byte[] ) bytes;
20     }
21 }
22
Popular Tags