public class DoubleValueAccessor extends java.lang.Object implements ValueAccessor
LOGGER| Constructor and Description |
|---|
DoubleValueAccessor() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
getJavaType(BaseElement elem)
Provides the Java type to be used for JDBC columns and parameters in the Manifold SQL APIs.
|
int |
getJdbcType()
Indicates the JDBC type handled by this implementation.
|
java.lang.String |
getParameterExpression(java.sql.DatabaseMetaData metaData,
java.lang.Object value,
ColumnInfo ci)
Supply a parameter expression.
|
java.lang.Double |
getRowValue(java.sql.ResultSet rs,
BaseElement elem)
Returns a query result value corresponding with an
elem from result set, rs. |
void |
setParameter(java.sql.PreparedStatement ps,
int pos,
java.lang.Object value)
Sets the query parameter value corresponding with
pos. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetClassForColumnClassNamepublic int getJdbcType()
ValueAccessorgetJdbcType in interface ValueAccessorTypes id this accessor handles. This type must be unique among other ValueAccessor
instances returned from ValueAccessorProvider.get(int).public java.lang.Class<?> getJavaType(BaseElement elem)
ValueAccessorgetJavaType in interface ValueAccessorelem - A schema column, query column, parameter, or other value bearing element.elem in the Manifold SQL APIs.public java.lang.Double getRowValue(java.sql.ResultSet rs,
BaseElement elem)
throws java.sql.SQLException
ValueAccessorelem from result set, rs.getRowValue in interface ValueAccessorrs - The result set containing rows of column valueselem - The query column containing the valueelem. Note, the type of the value must match the Java type returned from
elem.getJdbcType().java.sql.SQLExceptionpublic java.lang.String getParameterExpression(java.sql.DatabaseMetaData metaData,
java.lang.Object value,
ColumnInfo ci)
ValueAccessor?, however some JDBC drivers and database systems
require explicit casts when using certain data types. For instance, Postgres requires casts for several types e.g.,
Boolean to bit; there is no other way to get a value from Java into a Postgres bit column.getParameterExpression in interface ValueAccessorpublic void setParameter(java.sql.PreparedStatement ps,
int pos,
java.lang.Object value)
throws java.sql.SQLException
ValueAccessorpos.setParameter in interface ValueAccessorps - The prepared statement containing the parameterized query.pos - The index of the parameter, beginning with 1.value - The value of the parameterjava.sql.SQLExceptionCopyright © 2024. All rights reserved.