Interface RelationalStruct
-
- All Superinterfaces:
java.sql.Struct
,java.sql.Wrapper
- All Known Subinterfaces:
RelationalResultSet
public interface RelationalStruct extends java.sql.Struct, java.sql.Wrapper
AStruct
but with metadata describing the instance.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RelationalArray
getArray(int oneBasedPosition)
RelationalArray
getArray(java.lang.String fieldName)
default java.lang.Object[]
getAttributes()
default java.lang.Object[]
getAttributes(java.util.Map<java.lang.String,java.lang.Class<?>> map)
boolean
getBoolean(int oneBasedPosition)
boolean
getBoolean(java.lang.String fieldName)
byte[]
getBytes(int oneBasedPosition)
byte[]
getBytes(java.lang.String fieldName)
double
getDouble(int oneBasedPosition)
double
getDouble(java.lang.String fieldName)
float
getFloat(int oneBasedPosition)
float
getFloat(java.lang.String fieldName)
int
getInt(int oneBasedPosition)
int
getInt(java.lang.String fieldName)
long
getLong(int oneBasedPosition)
long
getLong(java.lang.String fieldName)
StructMetaData
getMetaData()
java.lang.Object
getObject(int oneBasedPosition)
java.lang.Object
getObject(java.lang.String fieldName)
static int
getOneBasedPosition(java.lang.String columnName, RelationalStruct relationalStruct)
Utility for figuring out one-based-position of a column when passed columnName.default java.lang.String
getSQLTypeName()
java.lang.String
getString(int oneBasedPosition)
java.lang.String
getString(java.lang.String fieldName)
RelationalStruct
getStruct(int oneBasedPosition)
RelationalStruct
getStruct(java.lang.String fieldName)
default boolean
isWrapperFor(java.lang.Class<?> iface)
default <T> T
unwrap(java.lang.Class<T> iface)
boolean
wasNull()
-
-
-
Method Detail
-
getMetaData
StructMetaData getMetaData() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getBoolean
boolean getBoolean(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getBoolean
boolean getBoolean(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInt
int getInt(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getInt
int getInt(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getLong
long getLong(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getLong
long getLong(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getFloat
float getFloat(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getFloat
float getFloat(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getDouble
double getDouble(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getDouble
double getDouble(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getBytes
byte[] getBytes(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getBytes
byte[] getBytes(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getString
java.lang.String getString(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getString
java.lang.String getString(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getObject
java.lang.Object getObject(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getObject
java.lang.Object getObject(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getStruct
RelationalStruct getStruct(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getStruct
RelationalStruct getStruct(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getArray
RelationalArray getArray(int oneBasedPosition) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getArray
RelationalArray getArray(java.lang.String fieldName) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
wasNull
boolean wasNull() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getSQLTypeName
default java.lang.String getSQLTypeName() throws java.sql.SQLException
- Specified by:
getSQLTypeName
in interfacejava.sql.Struct
- Throws:
java.sql.SQLException
-
getAttributes
default java.lang.Object[] getAttributes() throws java.sql.SQLException
- Specified by:
getAttributes
in interfacejava.sql.Struct
- Throws:
java.sql.SQLException
-
getAttributes
default java.lang.Object[] getAttributes(java.util.Map<java.lang.String,java.lang.Class<?>> map) throws java.sql.SQLException
- Specified by:
getAttributes
in interfacejava.sql.Struct
- Throws:
java.sql.SQLException
-
unwrap
default <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
default boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
getOneBasedPosition
static int getOneBasedPosition(java.lang.String columnName, RelationalStruct relationalStruct) throws java.sql.SQLException
Utility for figuring out one-based-position of a column when passed columnName.- Parameters:
columnName
- Name to lookup.relationalStruct
- Where to do the lookup.- Returns:
- One-based positional index to use accessing the column.
- Throws:
java.sql.SQLException
- Thrown if we can't find matching column of we have trouble getting metadata.
-
-