A - Base array type supported.private abstract static class ArrayEncoding.AbstractArrayEncoder<A> extends java.lang.Object implements ArrayEncoding.ArrayEncoder<A>
ArrayEncoding.ArrayEncoder and provide
multi-dimensional support.| Modifier and Type | Field and Description |
|---|---|
(package private) int |
arrayOid |
private int |
oid |
| Constructor and Description |
|---|
AbstractArrayEncoder(int oid,
int arrayOid) |
| Modifier and Type | Method and Description |
|---|---|
(package private) int |
countNulls(A array)
Counts the number of
null elements in array. |
int |
getDefaultArrayTypeOid()
By default returns the arrayOid this instance was instantiated with.
|
(package private) int |
getTypeOID(int arrayOid) |
boolean |
supportBinaryRepresentation(int oid)
By default returns
true if oid matches the arrayOid
this instance was instantiated with. |
java.lang.String |
toArrayString(char delim,
A array)
Creates
String representation of the array. |
(package private) abstract byte[] |
toSingleDimensionBinaryRepresentation(BaseConnection connection,
A array)
Creates
byte[] of just the raw data (no metadata). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendArray, toBinaryRepresentationAbstractArrayEncoder(int oid,
int arrayOid)
oid - The default/primary base oid type.arrayOid - The default/primary array oid type.int getTypeOID(int arrayOid)
arrayOid - The array oid to get base oid type for.ArrayEncoding.ArrayEncoder.toBinaryRepresentation(BaseConnection, Object, int).public int getDefaultArrayTypeOid()
getDefaultArrayTypeOid in interface ArrayEncoding.ArrayEncoder<A>int countNulls(A array)
null elements in array.array - The array to count null elements in.null elements in array.abstract byte[] toSingleDimensionBinaryRepresentation(BaseConnection connection, A array) throws java.sql.SQLException, java.sql.SQLFeatureNotSupportedException
byte[] of just the raw data (no metadata).connection - The connection the binary representation will be used on.array - The array to create binary representation of. Will not be
null, but may contain null elements.byte[] of just the raw data (no metadata).java.sql.SQLFeatureNotSupportedException - If supportBinaryRepresentation(int) is false for
oid.java.sql.SQLExceptionpublic java.lang.String toArrayString(char delim,
A array)
String representation of the array.toArrayString in interface ArrayEncoding.ArrayEncoder<A>delim - The character to use to delimit between elements.array - The array to represent as a String.String representation of the array.public boolean supportBinaryRepresentation(int oid)
true if oid matches the arrayOid
this instance was instantiated with.supportBinaryRepresentation in interface ArrayEncoding.ArrayEncoder<A>oid - The array oid to see check for binary support.ArrayEncoding.ArrayEncoder.toBinaryRepresentation(BaseConnection, Object, int) is
supported for oid.