Package org.sqlproc.engine.type
Class SqlInstantType
- java.lang.Object
-
- org.sqlproc.engine.type.SqlDefaultType
-
- org.sqlproc.engine.type.SqlInstantType
-
- All Implemented Interfaces:
SqlMetaType,SqlTaggedMetaType
- Direct Known Subclasses:
JdbcInstantType
public abstract class SqlInstantType extends SqlDefaultType
The META type LOCALTIME.- Author:
- Vladimir Hudec
-
-
Field Summary
-
Fields inherited from class org.sqlproc.engine.type.SqlDefaultType
logger
-
-
Constructor Summary
Constructors Constructor Description SqlInstantType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>[]getClassTypes()Returns the list of Java class types related to this META type.String[]getMetaTypes()Returns the list of names of this META type.ObjectgetResult(SqlRuntimeContext runtimeCtx, String attributeName, Object resultValue, boolean ingoreError)Returns the attribute's result value (with possible conversion).voidsetParameter(SqlRuntimeContext runtimeCtx, SqlQuery query, String paramName, Object inputValue, boolean ingoreError, Class<?>... inputTypes)Binds an input value to a named query parameter.voidsetResult(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 org.sqlproc.engine.type.SqlDefaultType
addScalar, getClassTypesForDefault
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sqlproc.engine.type.SqlMetaType
addScalarEntryLog, error, getProviderSqlType, setParameterEntryLog, setResultEntryLog
-
-
-
-
Method Detail
-
getClassTypes
public Class<?>[] getClassTypes()
Returns the list of Java class types related to this META type.- Returns:
- the list of Java class types related to this META type
-
getMetaTypes
public String[] getMetaTypes()
Returns the list of names of this META type. These names can be used in the META SQL statements.- Returns:
- list of names of this META type. These names can be used in the META SQL statements
-
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:
setResultin interfaceSqlMetaType- Overrides:
setResultin classSqlDefaultType- Parameters:
runtimeCtx- the 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
-
getResult
public Object getResult(SqlRuntimeContext runtimeCtx, String attributeName, Object resultValue, boolean ingoreError) throws SqlRuntimeException
Returns the attribute's result value (with possible conversion).- Parameters:
runtimeCtx- the runtimeCtx contextattributeName- 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, boolean ingoreError, Class<?>... inputTypes) throws SqlRuntimeException
Binds an input value to a named query parameter.- Specified by:
setParameterin interfaceSqlMetaType- Overrides:
setParameterin classSqlDefaultType- Parameters:
runtimeCtx- the runtimeCtx contextquery- the SQL Engine query, an adapter or proxy to the internal JDBC or ORM staffparamName- the name of the parameteringoreError- ignore improper input value handlinginputTypes- the Java types of the attribute in the input POJO- Throws:
SqlRuntimeException- in the case of any problem with the input values handling
-
-