Package oracle.sql
Class StructDescriptor
- java.lang.Object
-
- oracle.sql.TypeDescriptor
-
- oracle.sql.StructDescriptor
-
- All Implemented Interfaces:
Serializable,oracle.jdbc.internal.ACProxyable,oracle.jdbc.internal.ObjectData,oracle.jdbc.internal.OracleTypeMetaData,oracle.jdbc.internal.OracleTypeMetaData.Struct,OracleData,OracleTypeMetaData,OracleTypeMetaData.Struct,ORAData
public class StructDescriptor extends TypeDescriptor implements oracle.jdbc.internal.OracleTypeMetaData.Struct, Serializable
Deprecated.Use factory method Connection.createStruct to create an instance of java.sql.Struct directly.Descriptor of a SQL structured object. (That is an SQL Object type). Its main responsibility is understanding how to convert between various representations of such a struct.There should be a method to return information about the fields (beyond their number. But there is no public representation for that.
-
<section role="region">
-
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.Struct
-
Nested classes/interfaces inherited from interface oracle.jdbc.OracleTypeMetaData
OracleTypeMetaData.Array, OracleTypeMetaData.ArrayStorage, OracleTypeMetaData.Kind, OracleTypeMetaData.Opaque, OracleTypeMetaData.Struct
-
-
Field Summary
-
Fields inherited from class oracle.sql.TypeDescriptor
ANYDATASETTOID, ANYDATATOID, ANYTYPETOID, DEBUG_SERIALIZATION, JSONTOID, KOIDFLEN, RAWTOID, TYPECODE_BDOUBLE, TYPECODE_BFILE, TYPECODE_BFLOAT, TYPECODE_BLOB, TYPECODE_BOOLEAN, TYPECODE_CFILE, TYPECODE_CHAR, TYPECODE_CLOB, TYPECODE_DATE, TYPECODE_DECIMAL, TYPECODE_DOUBLE, TYPECODE_ERRHP, TYPECODE_FLOAT, TYPECODE_INTEGER, TYPECODE_INTERVAL_DS, TYPECODE_INTERVAL_YM, TYPECODE_ITABLE, TYPECODE_JDBC_ARRAY, TYPECODE_JDBC_JOBJECT, TYPECODE_JDBC_JOPAQUE, TYPECODE_JDBC_JSTRUCT, TYPECODE_JDBC_REF, TYPECODE_JDBC_STRUCT, TYPECODE_MLSLABEL, TYPECODE_NAMEDCOLLECTION, TYPECODE_NCHAR, TYPECODE_NCLOB, TYPECODE_NONE, TYPECODE_NUMBER, TYPECODE_NVARCHAR2, TYPECODE_OBJECT, TYPECODE_OCTET, TYPECODE_OPAQUE, TYPECODE_OTMFIRST, TYPECODE_OTMLAST, TYPECODE_PLS_INTEGER, TYPECODE_PTR, TYPECODE_RAW, TYPECODE_REAL, TYPECODE_RECORD, TYPECODE_REF, TYPECODE_SIGNED16, TYPECODE_SIGNED32, TYPECODE_SIGNED8, TYPECODE_SMALLINT, TYPECODE_SQLXML, TYPECODE_SYSFIRST, TYPECODE_SYSLAST, TYPECODE_TABLE, TYPECODE_TIME, TYPECODE_TIME_TZ, TYPECODE_TIMESTAMP, TYPECODE_TIMESTAMP_LTZ, TYPECODE_TIMESTAMP_TZ, TYPECODE_UNSIGNED16, TYPECODE_UNSIGNED32, TYPECODE_UNSIGNED8, TYPECODE_UROWID, TYPECODE_VARCHAR, TYPECODE_VARCHAR2, TYPECODE_VARRAY, XMLTYPETOID
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StructDescriptorcreateDescriptor(String name, Connection conn)Deprecated.Descriptor factory.static StructDescriptorcreateDescriptor(String name, Connection conn, boolean recurse, boolean force)Deprecated.Descriptor factory.static StructDescriptorcreateDescriptor(oracle.sql.SQLName name, Connection conn)Deprecated.static StructDescriptorcreateDescriptor(oracle.sql.SQLName sqlName, Connection conn, boolean recurse, boolean force)Deprecated.StringdescType()Deprecated.Describe this type.AttributeDescriptor[]getAttributesDescriptor()Deprecated.StringgetJavaClassName()Deprecated.Returns the external name of the JAVA_STRUCT type.OracleTypeMetaData.KindgetKind()Deprecated.Return the kind of type.StringgetLanguage()Deprecated.intgetLength()Deprecated.The number of fields in the Object Type.intgetLocalAttributeCount()Deprecated.Returns the number of attributes defined in the subtype.ResultSetMetaDatagetMetaData()Deprecated.Gets the metadata regarding this type.String[]getSubtypeNames()Deprecated.Returns the SQL type names of the direct subtypes.StringgetSupertypeName()Deprecated.Returns the SQL type name of the direct subtype.intgetTypeCode()Deprecated.Returns type code.intgetTypeVersion()Deprecated.booleanisFinalType()Deprecated.Indicates whether the object type is a final type.booleanisInstantiable()Deprecated.Indicates whether the object type is instantiable.booleanisJavaObject()Deprecated.Indicates whether the object type is a JAVA_STRUCT type or a STRUCT type.booleanisSubtype()Deprecated.Indicates whether the object type is a subtype.Datum[]toOracleArray(Map attributes)Deprecated.-
Methods inherited from class oracle.sql.TypeDescriptor
convToUpperCase, getConnectionDuringExceptionHandling, getInternalTypeCode, getName, getPrecision, getScale, getSubtypeName, getTypeCodeName, initMetadataRecursively, initNamesRecursively, isTransient, isV2available, printXML, printXML, setConnection, setPrecision, setScale, toDatum, toJDBCObject, toXMLString, toXMLString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface oracle.jdbc.OracleTypeMetaData
getName, getSchemaName, getSQLName, getTypeCodeName
-
-
-
<section role="region">
-
Method Detail
-
createDescriptor
public static StructDescriptor createDescriptor(String name, Connection conn) throws SQLException
Deprecated.Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.- Parameters:
name- a String naming the type. (Not necessarily fully qualified)conn- a Connection to a database- Returns:
- the descriptor created.
- Throws:
SQLException
-
createDescriptor
public static StructDescriptor createDescriptor(String name, Connection conn, boolean recurse, boolean force) throws SQLException
Deprecated.Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.- Parameters:
name- a String naming the type. (Not necessarily fully qualified)connection- a Connection to a databaserecurse- a boolean to specify whether to create descriptors for component objectsforce- a boolean to specify whether to replace any cached descriptor.- Returns:
- the descriptor created.
- Throws:
SQLException
-
createDescriptor
public static StructDescriptor createDescriptor(oracle.sql.SQLName sqlName, Connection conn, boolean recurse, boolean force) throws SQLException
Deprecated.Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.- Parameters:
name- a String naming the type. (Not necessarily fully qualified)connection- a Connection to a databaserecurse- a boolean to specify whether to create descriptors for component objectsforce- a boolean to specify whether to replace any cached descriptor.- Returns:
- the descriptor created. Use connection.createStruct intead
- Throws:
SQLException
-
createDescriptor
public static StructDescriptor createDescriptor(oracle.sql.SQLName name, Connection conn) throws SQLException
Deprecated.Descriptor factory. Lookup the name in the database, and determine the characteristics of this array.- Parameters:
name- a String naming the type. (Not necessarily fully qualified)connection- a Connection to a database- Returns:
- the descriptor created. Use connection.createStruct intead
- Throws:
SQLException
-
getKind
public OracleTypeMetaData.Kind getKind()
Deprecated.Description copied from interface:OracleTypeMetaDataReturn the kind of type.- Specified by:
getKindin interfaceOracleTypeMetaData- Overrides:
getKindin classTypeDescriptor- Returns:
- the kind, STRUCT
-
getTypeCode
public int getTypeCode() throws SQLExceptionDeprecated.Description copied from class:TypeDescriptorReturns type code.- Specified by:
getTypeCodein interfaceOracleTypeMetaData- Overrides:
getTypeCodein classTypeDescriptor- Throws:
SQLException
-
getTypeVersion
public int getTypeVersion() throws SQLExceptionDeprecated.- Specified by:
getTypeVersionin interfaceOracleTypeMetaData.Struct- Throws:
SQLException
-
getAttributesDescriptor
public AttributeDescriptor[] getAttributesDescriptor()
Deprecated.
-
getLength
public int getLength() throws SQLExceptionDeprecated.The number of fields in the Object Type.- Specified by:
getLengthin interfaceOracleTypeMetaData.Struct- Returns:
- the size.
- Throws:
SQLException
-
toOracleArray
public Datum[] toOracleArray(Map attributes) throws SQLException
Deprecated.- Throws:
SQLException
-
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
Deprecated.Gets the metadata regarding this type. The return ResultSetMetaData contains the attribute name, attribute type id and attribute type precision information. The column index in ResultSetMetaData maps to the position of the attribute in a Struct (with the first attribute being at index 1).- Specified by:
getMetaDatain interfaceOracleTypeMetaData.Struct- Returns:
- a ResultSetMetaData object that contains the type info
- Throws:
SQLException
-
isFinalType
public boolean isFinalType() throws SQLExceptionDeprecated.Indicates whether the object type is a final type.- Specified by:
isFinalTypein interfaceOracleTypeMetaData.Struct- Returns:
- true if the object type is a final type and false otherwise.
- Throws:
SQLException- Since:
- 8.2.0
-
isSubtype
public boolean isSubtype() throws SQLExceptionDeprecated.Indicates whether the object type is a subtype.- Specified by:
isSubtypein interfaceOracleTypeMetaData.Struct- Returns:
- true if the object type is a subtype and false otherwise.
- Throws:
SQLException- Since:
- 8.2.0
-
isInstantiable
public boolean isInstantiable() throws SQLExceptionDeprecated.Indicates whether the object type is instantiable.- Specified by:
isInstantiablein interfaceOracleTypeMetaData.Struct- Returns:
- true if the object type is instantiable and false otherwise.
- Throws:
SQLException- Since:
- 8.2.0
-
isJavaObject
public boolean isJavaObject() throws SQLExceptionDeprecated.Indicates whether the object type is a JAVA_STRUCT type or a STRUCT type.- Returns:
- true if the object type is a JAVA_STRUCT type and false if the object type is a STRUCT type.
- Throws:
SQLException- Since:
- 8.2.0
-
getSupertypeName
public String getSupertypeName() throws SQLException
Deprecated.Returns the SQL type name of the direct subtype.- Specified by:
getSupertypeNamein interfaceOracleTypeMetaData.Struct- Returns:
- the fully qualified name of the supertype. Returns null if the object type is not a subtype.
- Throws:
SQLException- Since:
- 8.2.0
-
getLocalAttributeCount
public int getLocalAttributeCount() throws SQLExceptionDeprecated.Returns the number of attributes defined in the subtype.- Specified by:
getLocalAttributeCountin interfaceOracleTypeMetaData.Struct- Returns:
- number of subtype attributes.
- Throws:
SQLException- Since:
- 8.2.0
-
getSubtypeNames
public String[] getSubtypeNames() throws SQLException
Deprecated.Returns the SQL type names of the direct subtypes.- Specified by:
getSubtypeNamesin interfaceOracleTypeMetaData.Struct- Returns:
- the fully qualifed name of the direct subtypes. Returns an empty String array if there is no subtypes.
- Throws:
SQLException- Since:
- 8.2.0
-
getJavaClassName
public String getJavaClassName() throws SQLException
Deprecated.Returns the external name of the JAVA_STRUCT type.- Returns:
- the JAVA_STRUCT's Java type name. Returns null if the object type is not a JAVA_STRUCT type.
- Throws:
SQLException- Since:
- 8.2.0
-
getLanguage
public String getLanguage() throws SQLException
Deprecated.- Returns:
- JAVA if this is a JAVA_STRUCT, SQL otherwise
- Throws:
SQLException- Since:
- 8.2.0
-
descType
public String descType() throws SQLException
Deprecated.Describe this type.- Returns:
- the type information.
- Throws:
SQLException
-
-