KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > versant > core > jdbc > sql > conv > UByteArrayConverter


1
2 /*
3  * Copyright (c) 1998 - 2005 Versant Corporation
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution, and is available at
7  * http://www.eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Versant Corporation - initial API and implementation
11  */

12 package com.versant.core.jdbc.sql.conv;
13
14 import com.versant.core.jdbc.JdbcConverter;
15
16 /**
17  * This converter converts byte[] to and from SQL. It delegates to a nested
18  * converter based on the JDBC type of the column.
19  * @keep-all
20  */

21 public class UByteArrayConverter extends TypeAsBytesConverterBase {
22
23     public static class Factory extends TypeAsBytesConverterBase.Factory {
24
25         protected JdbcConverter createConverter(JdbcConverter nested) {
26             return new UByteArrayConverter(nested);
27         }
28
29     }
30
31     public UByteArrayConverter(JdbcConverter nested) {
32         super(nested);
33     }
34
35     /**
36      * Convert a byte[] into an instance of our value class.
37      */

38     protected Object JavaDoc fromByteArray(byte[] buf) {
39
40         return null;
41     }
42
43     /**
44      * Convert an instance of our value class into a byte[].
45      */

46     protected byte[] toByteArray(Object JavaDoc value) {
47
48         return null;
49     }
50
51     /**
52      * Get the type of our expected value objects (e.g. java.util.Locale
53      * for a converter for Locale's).
54      */

55     public Class JavaDoc getValueType() {
56
57         return null;
58     }
59
60 }
61
62
Popular Tags