org.sqlproc.engine.jdbc.type
Class JdbcDefaultType
java.lang.Object
org.sqlproc.engine.type.SqlMetaType
org.sqlproc.engine.jdbc.type.JdbcDefaultType
public class JdbcDefaultType
- extends SqlMetaType
The default META type for the JDBC stack. It's used in the case there's no explicit META type declaration in the META
SQL statements.
- Author:
- Vladimir Hudec
|
Field Summary |
(package private) static Map<Class<?>,Object> |
jdbcTypes
The map between the Java types and the META types. |
|
Method Summary |
void |
addScalar(SqlQuery query,
String dbName,
Class<?> attributeType)
Declares a scalar query result, which is an SQL query execution output value. |
void |
setParameter(SqlRuntimeContext runtimeCtx,
SqlQuery query,
String paramName,
Object inputValue,
Class<?> inputType,
boolean ingoreError)
Binds an input value to a named query parameter. |
void |
setResult(SqlRuntimeContext runtimeCtx,
Object resultInstance,
String attributeName,
Object resultValue,
boolean ingoreError)
Initializes the attribute of the result class with output value from the SQL query execution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jdbcTypes
static Map<Class<?>,Object> jdbcTypes
- The map between the Java types and the META types.
JdbcDefaultType
public JdbcDefaultType()
addScalar
public void addScalar(SqlQuery query,
String dbName,
Class<?> attributeType)
- Declares a scalar query result, which is an SQL query execution output value.
- Specified by:
addScalar in class SqlMetaType
- Parameters:
query - the SQL Engine query, an adapter or proxy to the internal JDBC or ORM staffdbName - the name of a database query output, it can be the column name or the alias nameattributeType - the Java type of of the attribute in the result class
setResult
public void setResult(SqlRuntimeContext runtimeCtx,
Object resultInstance,
String attributeName,
Object resultValue,
boolean ingoreError)
throws SqlRuntimeException
- Initializes the attribute of the result class with output value from the SQL query execution.
- Specified by:
setResult in class SqlMetaType
- Parameters:
runtimeCtx - the public runtimeCtx contextresultInstance - the instance of the result classattributeName - the name of the attribute in the result classresultValue - the query execution output valueingoreError - ignore improper output value handling
- Throws:
SqlRuntimeException - in the case of any problem with the output values handling
setParameter
public void setParameter(SqlRuntimeContext runtimeCtx,
SqlQuery query,
String paramName,
Object inputValue,
Class<?> inputType,
boolean ingoreError)
throws SqlRuntimeException
- Binds an input value to a named query parameter.
- Specified by:
setParameter in class SqlMetaType
- Parameters:
runtimeCtx - the public runtimeCtx contextquery - the SQL Engine query, an adapter or proxy to the internal JDBC or ORM staffparamName - the name of the parameterinputValue - the possibly-null parameter value, a dynamic input valueingoreError - ignore improper input value handling
- Throws:
SqlRuntimeException - in the case of any problem with the input values handling
Copyright © 2015. All rights reserved.