次の方法で共有


IResultSet.GetObject Method

Definition

Overloads

GetObject(String, IDictionary<String,Class>)

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

GetObject(Int32, IDictionary<String,Class>)

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

GetObject(Int32)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

GetObject(String)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

GetObject(String, IDictionary<String,Class>)

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

[Android.Runtime.Register("getObject", "(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;", "GetGetObject_Ljava_lang_String_Ljava_util_Map_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? GetObject (string? columnLabel, System.Collections.Generic.IDictionary<string,Java.Lang.Class>? map);
[<Android.Runtime.Register("getObject", "(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;", "GetGetObject_Ljava_lang_String_Ljava_util_Map_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetObject : string * System.Collections.Generic.IDictionary<string, Java.Lang.Class> -> Java.Lang.Object

Parameters

columnLabel
String

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

map
IDictionary<String,Class>

a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language

Returns

an Object representing the SQL value in the specified column

Attributes

Remarks

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the specified Map object for custom mapping if appropriate.

Added in 1.2.

Java documentation for java.sql.ResultSet.getObject(java.lang.String, java.util.Map<java.lang.String, java.lang.Class<?>>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetObject(Int32, IDictionary<String,Class>)

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

[Android.Runtime.Register("getObject", "(ILjava/util/Map;)Ljava/lang/Object;", "GetGetObject_ILjava_util_Map_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? GetObject (int columnIndex, System.Collections.Generic.IDictionary<string,Java.Lang.Class>? map);
[<Android.Runtime.Register("getObject", "(ILjava/util/Map;)Ljava/lang/Object;", "GetGetObject_ILjava_util_Map_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetObject : int * System.Collections.Generic.IDictionary<string, Java.Lang.Class> -> Java.Lang.Object

Parameters

columnIndex
Int32

the first column is 1, the second is 2, ...

map
IDictionary<String,Class>

a java.util.Map object that contains the mapping from SQL type names to classes in the Java programming language

Returns

an Object in the Java programming language representing the SQL value

Attributes

Remarks

Retrieves the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language. If the value is an SQL NULL, the driver returns a Java null. This method uses the given Map object for the custom mapping of the SQL structured or distinct type that is being retrieved.

Added in 1.2.

Java documentation for java.sql.ResultSet.getObject(int, java.util.Map<java.lang.String, java.lang.Class<?>>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetObject(Int32)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

[Android.Runtime.Register("getObject", "(I)Ljava/lang/Object;", "GetGetObject_IHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? GetObject (int columnIndex);
[<Android.Runtime.Register("getObject", "(I)Ljava/lang/Object;", "GetGetObject_IHandler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetObject : int -> Java.Lang.Object

Parameters

columnIndex
Int32

the first column is 1, the second is 2, ...

Returns

a java.lang.Object holding the column value

Attributes

Exceptions

if a database error happens.

Remarks

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method may also be used to read database-specific abstract data types.

In the JDBC 2.0 API, the behavior of method getObject is extended to materialize data of SQL user-defined types.

If Connection.getTypeMap does not throw a SQLFeatureNotSupportedException, then when a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

If Connection.getTypeMap does throw a SQLFeatureNotSupportedException, then structured values are not supported, and distinct values are mapped to the default Java class as determined by the underlying SQL type of the DISTINCT type.

Java documentation for java.sql.ResultSet.getObject(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetObject(String)

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

[Android.Runtime.Register("getObject", "(Ljava/lang/String;)Ljava/lang/Object;", "GetGetObject_Ljava_lang_String_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Java.Lang.Object? GetObject (string? columnLabel);
[<Android.Runtime.Register("getObject", "(Ljava/lang/String;)Ljava/lang/Object;", "GetGetObject_Ljava_lang_String_Handler:Java.Sql.IResultSetInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetObject : string -> Java.Lang.Object

Parameters

columnLabel
String

the label for the column specified with the SQL AS clause. If the SQL AS clause was not specified, then the label is the name of the column

Returns

a java.lang.Object holding the column value

Attributes

Exceptions

if a database error happens.

Remarks

Gets the value of the designated column in the current row of this ResultSet object as an Object in the Java programming language.

This method will return the value of the given column as a Java object. The type of the Java object will be the default Java object type corresponding to the column's SQL type, following the mapping for built-in types specified in the JDBC specification. If the value is an SQL NULL, the driver returns a Java null.

This method may also be used to read database-specific abstract data types.

In the JDBC 2.0 API, the behavior of the method getObject is extended to materialize data of SQL user-defined types. When a column contains a structured or distinct value, the behavior of this method is as if it were a call to: getObject(columnIndex, this.getStatement().getConnection().getTypeMap()).

Java documentation for java.sql.ResultSet.getObject(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to