Result
Result.OutParameterMap
, Result.Row
public static interface Result.ResultMap extends Result
Result
where the components can be retrieved by name. What
constitutes a name is implementation dependent.Result.Count, Result.OutParameterMap, Result.ResultMap, Result.Row
Modifier and Type | Method | Description |
---|---|---|
<T> T |
get(java.lang.String id,
java.lang.Class<T> type) |
Return the value indicated by the
id . |
java.lang.String[] |
getIdentifiers() |
Returns a
{@link String}[] that contains the identifiers that reference the
values of this Result.ResultMap in the same order these values are returned by the
database. |
<T> T get(java.lang.String id, java.lang.Class<T> type)
id
. The id
may be either the id for an
OUT parameter marker or for a column. See OutOperation
and
RowOperation
.T
- the type of the returned valueid
- the name of the column or OUT parameter markertype
- the value indicated by id
is converted to this typeT
java.lang.IllegalArgumentException
- if id is not the identifier of a value
in this Result.ResultMap
java.lang.IllegalStateException
- if the call that was passed this Result.ResultMap
has
endedjava.lang.ClassCastException
- if the returned value cannot be converted to the
specified type -- ISSUE: Not really a class cast. Maybe a new unchecked exception.java.lang.String[] getIdentifiers()
{@link String}[]
that contains the identifiers that reference the
values of this Result.ResultMap
in the same order these values are returned by the
database. A null
value in the array means there is a returned value for
which no identifier was defined. There is no way to retrieve such a
value.
By default the values in the array are the identifier portion of the out
parameter markers in the SQL. Alternatively the implementation may assign
other identifiers, typically column names or aliases. If there
are values that have no associated identifier the corresponding value in
the array will be null.null
.java.lang.IllegalStateException
- if the call that was passed this Result.ResultMap
has
endedReport a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2017, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.
DRAFT JDBC 4.4 EA