Class TypeDescriptor
- All Implemented Interfaces:
Serializable,oracle.jdbc.diagnostics.Diagnosable,oracle.jdbc.diagnostics.PropertyChangeListener,oracle.jdbc.internal.ACProxyable,oracle.jdbc.internal.ObjectData,oracle.jdbc.internal.OracleTypeMetaData,OracleData,OracleTypeMetaData,ORAData
- Direct Known Subclasses:
ArrayDescriptor,OpaqueDescriptor,StructDescriptor
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface oracle.jdbc.internal.OracleTypeMetaData
oracle.jdbc.internal.OracleTypeMetaData.Array, oracle.jdbc.internal.OracleTypeMetaData.Opaque, oracle.jdbc.internal.OracleTypeMetaData.StructNested classes/interfaces inherited from interface oracle.jdbc.OracleTypeMetaData
OracleTypeMetaData.ArrayStorage, OracleTypeMetaData.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte[]static final byte[]static final byte[]static booleanstatic final byte[]static final intstatic final byte[]static final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final byte[] -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTypeDescriptor(short _typeCode) protectedTypeDescriptor(short _typeCode, String name, Connection conn) protectedTypeDescriptor(short _typeCode, oracle.jdbc.oracore.OracleTypeADT type, Connection conn) protectedTypeDescriptor(short _typeCode, oracle.sql.SQLName name, Connection conn) protectedTypeDescriptor(short _typeCode, oracle.sql.SQLName name, oracle.jdbc.oracore.OracleTypeADT type, Connection conn) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvToUpperCase(String str) Convert the String to UpperCase character by characterprotected oracle.jdbc.internal.OracleConnectionoracle.jdbc.diagnostics.DiagnosableshortgetKind()Return the kind of type.getName()Return fully qualified type name.longbytegetScale()static StringgetSubtypeName(OracleConnection conn, byte[] image, long offset) intReturns type code.Returns the type code name.static TypeDescriptorgetTypeDescriptor(String qualifiedName, OracleConnection conn, byte[] image, long offset) Obtain the type descriptor associated with the specified type name.voidvoidbooleanstatic booleanisV2available(byte[] toid) voidPrint an XML representation of this type and all OracleTypes within.voidprintXML(PrintStream stream, boolean fetchAllMetaDataAsNeeded) Print an XML representation of this type and all OracleTypes within.voidsetConnection(Connection connection) voidsetPrecision(long _precision) voidsetScale(byte _scale) Extract an oracle.sql.Datum object.Extract a jdbc Object.Creates a String which is an XML representation of this type and all OracleTypes within.toXMLString(boolean fetchAllMetaDataAsNeeded) Creates a String which is an XML representation of this type and all OracleTypes within.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface oracle.jdbc.diagnostics.Diagnosable
begin, beginCurrentSql, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, debugp, end, endCurrentSql, format, isDebugEnabled, isDiagnoseFirstFailureEnabled, isLoggable, isSensitiveEnabled, onClose, propertyChange, resumeLogging, secure, suspendLogging, trace, tracep
-
Field Details
-
DEBUG_SERIALIZATION
public static boolean DEBUG_SERIALIZATION -
KOIDFLEN
public static final int KOIDFLEN- See Also:
-
RAWTOID
public static final byte[] RAWTOID -
JSONTOID
public static final byte[] JSONTOID -
ANYTYPETOID
public static final byte[] ANYTYPETOID -
ANYDATATOID
public static final byte[] ANYDATATOID -
ANYDATASETTOID
public static final byte[] ANYDATASETTOID -
XMLTYPETOID
public static final byte[] XMLTYPETOID -
TYPECODE_REF
public static final short TYPECODE_REF- See Also:
-
TYPECODE_DATE
public static final short TYPECODE_DATE- See Also:
-
TYPECODE_SIGNED8
public static final short TYPECODE_SIGNED8- See Also:
-
TYPECODE_SIGNED16
public static final short TYPECODE_SIGNED16- See Also:
-
TYPECODE_SIGNED32
public static final short TYPECODE_SIGNED32- See Also:
-
TYPECODE_REAL
public static final short TYPECODE_REAL- See Also:
-
TYPECODE_DOUBLE
public static final short TYPECODE_DOUBLE- See Also:
-
TYPECODE_BFLOAT
public static final short TYPECODE_BFLOAT- See Also:
-
TYPECODE_BDOUBLE
public static final short TYPECODE_BDOUBLE- See Also:
-
TYPECODE_FLOAT
public static final short TYPECODE_FLOAT- See Also:
-
TYPECODE_NUMBER
public static final short TYPECODE_NUMBER- See Also:
-
TYPECODE_DECIMAL
public static final short TYPECODE_DECIMAL- See Also:
-
TYPECODE_UNSIGNED8
public static final short TYPECODE_UNSIGNED8- See Also:
-
TYPECODE_UNSIGNED16
public static final short TYPECODE_UNSIGNED16- See Also:
-
TYPECODE_UNSIGNED32
public static final short TYPECODE_UNSIGNED32- See Also:
-
TYPECODE_OCTET
public static final short TYPECODE_OCTET- See Also:
-
TYPECODE_SMALLINT
public static final short TYPECODE_SMALLINT- See Also:
-
TYPECODE_INTEGER
public static final short TYPECODE_INTEGER- See Also:
-
TYPECODE_RAW
public static final short TYPECODE_RAW- See Also:
-
TYPECODE_PTR
public static final short TYPECODE_PTR- See Also:
-
TYPECODE_VARCHAR2
public static final short TYPECODE_VARCHAR2- See Also:
-
TYPECODE_CHAR
public static final short TYPECODE_CHAR- See Also:
-
TYPECODE_VARCHAR
public static final short TYPECODE_VARCHAR- See Also:
-
TYPECODE_MLSLABEL
public static final short TYPECODE_MLSLABEL- See Also:
-
TYPECODE_VARRAY
public static final short TYPECODE_VARRAY- See Also:
-
TYPECODE_TABLE
public static final short TYPECODE_TABLE- See Also:
-
TYPECODE_OBJECT
public static final short TYPECODE_OBJECT- See Also:
-
TYPECODE_OPAQUE
public static final short TYPECODE_OPAQUE- See Also:
-
TYPECODE_NAMEDCOLLECTION
public static final short TYPECODE_NAMEDCOLLECTION- See Also:
-
TYPECODE_BLOB
public static final short TYPECODE_BLOB- See Also:
-
TYPECODE_BFILE
public static final short TYPECODE_BFILE- See Also:
-
TYPECODE_CLOB
public static final short TYPECODE_CLOB- See Also:
-
TYPECODE_CFILE
public static final short TYPECODE_CFILE- See Also:
-
TYPECODE_TIME
public static final short TYPECODE_TIME- See Also:
-
TYPECODE_TIME_TZ
public static final short TYPECODE_TIME_TZ- See Also:
-
TYPECODE_TIMESTAMP
public static final short TYPECODE_TIMESTAMP- See Also:
-
TYPECODE_TIMESTAMP_TZ
public static final short TYPECODE_TIMESTAMP_TZ- See Also:
-
TYPECODE_TIMESTAMP_LTZ
public static final short TYPECODE_TIMESTAMP_LTZ- See Also:
-
TYPECODE_INTERVAL_YM
public static final short TYPECODE_INTERVAL_YM- See Also:
-
TYPECODE_INTERVAL_DS
public static final short TYPECODE_INTERVAL_DS- See Also:
-
TYPECODE_UROWID
public static final short TYPECODE_UROWID- See Also:
-
TYPECODE_OTMFIRST
public static final short TYPECODE_OTMFIRST- See Also:
-
TYPECODE_OTMLAST
public static final short TYPECODE_OTMLAST- See Also:
-
TYPECODE_SYSFIRST
public static final short TYPECODE_SYSFIRST- See Also:
-
TYPECODE_SYSLAST
public static final short TYPECODE_SYSLAST- See Also:
-
TYPECODE_PLS_INTEGER
public static final short TYPECODE_PLS_INTEGER- See Also:
-
TYPECODE_ITABLE
public static final short TYPECODE_ITABLE- See Also:
-
TYPECODE_RECORD
public static final short TYPECODE_RECORD- See Also:
-
TYPECODE_BOOLEAN
public static final short TYPECODE_BOOLEAN- See Also:
-
TYPECODE_NCHAR
public static final short TYPECODE_NCHAR- See Also:
-
TYPECODE_NVARCHAR2
public static final short TYPECODE_NVARCHAR2- See Also:
-
TYPECODE_NCLOB
public static final short TYPECODE_NCLOB- See Also:
-
TYPECODE_NONE
public static final short TYPECODE_NONE- See Also:
-
TYPECODE_ERRHP
public static final short TYPECODE_ERRHP- See Also:
-
TYPECODE_JDBC_JOBJECT
public static final short TYPECODE_JDBC_JOBJECT- See Also:
-
TYPECODE_JDBC_STRUCT
public static final short TYPECODE_JDBC_STRUCT- See Also:
-
TYPECODE_JDBC_ARRAY
public static final short TYPECODE_JDBC_ARRAY- See Also:
-
TYPECODE_JDBC_JOPAQUE
public static final short TYPECODE_JDBC_JOPAQUE- See Also:
-
TYPECODE_JDBC_REF
public static final short TYPECODE_JDBC_REF- See Also:
-
TYPECODE_JDBC_JSTRUCT
public static final short TYPECODE_JDBC_JSTRUCT- See Also:
-
TYPECODE_SQLXML
public static final short TYPECODE_SQLXML- See Also:
-
-
Constructor Details
-
TypeDescriptor
protected TypeDescriptor(short _typeCode) -
TypeDescriptor
- Throws:
SQLException
-
TypeDescriptor
protected TypeDescriptor(short _typeCode, oracle.sql.SQLName name, Connection conn) throws SQLException - Throws:
SQLException
-
TypeDescriptor
protected TypeDescriptor(short _typeCode, oracle.sql.SQLName name, oracle.jdbc.oracore.OracleTypeADT type, Connection conn) throws SQLException - Throws:
SQLException
-
TypeDescriptor
protected TypeDescriptor(short _typeCode, oracle.jdbc.oracore.OracleTypeADT type, Connection conn) throws SQLException - Throws:
SQLException
-
-
Method Details
-
getKind
Description copied from interface:OracleTypeMetaDataReturn the kind of type.- Specified by:
getKindin interfaceOracleTypeMetaData- Returns:
- the kind, TYPE
-
getName
Return fully qualified type name.- Specified by:
getNamein interfaceOracleTypeMetaData- Throws:
SQLException
-
getTypeCode
Returns type code.- Specified by:
getTypeCodein interfaceOracleTypeMetaData- Throws:
SQLException
-
getTypeCodeName
Returns the type code name.- Specified by:
getTypeCodeNamein interfaceOracleTypeMetaData- Throws:
SQLException
-
getInternalTypeCode
- Throws:
SQLException
-
isV2available
public static boolean isV2available(byte[] toid) -
getTypeDescriptor
public static TypeDescriptor getTypeDescriptor(String qualifiedName, OracleConnection conn, byte[] image, long offset) throws SQLException Obtain the type descriptor associated with the specified type name.- Parameters:
name- specifies the type name.conn- specifies the associated connection.- Returns:
- the appropriate descriptor for Array or Struct depending on the type name.
- Throws:
SQLException- if the specified type does not exist, or if an error occurred.
-
toDatum
Description copied from interface:ORADataExtract an oracle.sql.Datum object.This method is invoked by setORAData() to extract a Datum. The implementation of this method must return the correct type of Datum.
Although most implementation will ignore the connection, it is occassionally needed. For example, if the class embeds CHAR attributes, connection may be needed to determine the database character set.
- Specified by:
toDatumin interfaceORAData- Parameters:
c- The connection into which the value is being sent.- Returns:
- a Datum contaning the value to be sent into the connection.
- Throws:
SQLException- if an error occurred.
-
toJDBCObject
Description copied from interface:OracleDataExtract a jdbc Object.This method is invoked by setObject() to extract the jdbc Object. The implementation must return the jdbc Object that correctly represents the underlying SQLType.
Although most implementation will ignore the connection, it is occassionally needed. for example, if the class embeds CHAR attributes, connection may be needed to determine the database character set.
- Specified by:
toJDBCObjectin interfaceOracleData- Parameters:
c- The connection into which the value is being sent.- Returns:
- a jdbc Object containing the value to be sent into the connection.
- Throws:
SQLException- if an error occurred.
-
isTransient
public boolean isTransient() -
setPrecision
public void setPrecision(long _precision) -
getPrecision
public long getPrecision() -
setScale
public void setScale(byte _scale) -
getScale
public byte getScale() -
setConnection
- Throws:
SQLException
-
getSubtypeName
public static String getSubtypeName(OracleConnection conn, byte[] image, long offset) throws SQLException - Throws:
SQLException
-
initMetadataRecursively
- Throws:
SQLException
-
initNamesRecursively
- Throws:
SQLException
-
toXMLString
Creates a String which is an XML representation of this type and all OracleTypes within. Metadata for object types and collections is relatively expensive to get from the server. Not all of it is necessary depending on how the TypeDescriptor is used. In normal operation it is fetched as needed. This method will provide a representation of this type in its current state without fetching additional data- Throws:
SQLException
-
toXMLString
Creates a String which is an XML representation of this type and all OracleTypes within. Optionally causes any metadata which has not been previously fetched from the server to be obtained so as to provide a complete representation. See toXMLString()- Parameters:
fetchAllMetaDataAsNeeded- if set to true and if necessary the driver will fetch the metadata from the server- Throws:
SQLException
-
printXML
Print an XML representation of this type and all OracleTypes within.- Parameters:
s- a PrintStream upon which to write- Throws:
SQLException
-
printXML
Print an XML representation of this type and all OracleTypes within.- Parameters:
stream- a PrintStream upon which to writefetchAllMetaDataAsNeeded- if set to true and if necessary the driver will fetch the metadata from the server- Throws:
SQLException
-
getConnectionDuringExceptionHandling
protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling() -
convToUpperCase
Convert the String to UpperCase character by character- Parameters:
String-- Returns:
- String converted to Uppercase
-
getDiagnosable
public oracle.jdbc.diagnostics.Diagnosable getDiagnosable()- Specified by:
getDiagnosablein interfaceoracle.jdbc.diagnostics.Diagnosable
-