01: /*
02: * Copyright (c) 1998 - 2005 Versant Corporation
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * Versant Corporation - initial API and implementation
10: */
11: package com.versant.core.jdbc.sql.conv;
12:
13: import com.versant.core.jdbc.JdbcConverter;
14:
15: /**
16: * This converter converts byte[] to and from SQL. It delegates to a nested
17: * converter based on the JDBC type of the column.
18: * @keep-all
19: */
20: public class UByteArrayConverter extends TypeAsBytesConverterBase {
21:
22: public static class Factory extends
23: 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 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 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 getValueType() {
56:
57: return null;
58: }
59:
60: }
|