org.sqlproc.engine.type
Class SqlFromDateType

java.lang.Object
  extended by org.sqlproc.engine.type.SqlMetaType
      extended by org.sqlproc.engine.type.SqlInternalType
          extended by org.sqlproc.engine.type.SqlProviderType
              extended by org.sqlproc.engine.type.SqlFromDateType
Direct Known Subclasses:
JdbcFromDateType

public abstract class SqlFromDateType
extends SqlProviderType

The META type FROMDATE.

Author:
Vladimir Hudec

Field Summary
 
Fields inherited from class org.sqlproc.engine.type.SqlMetaType
logger
 
Constructor Summary
SqlFromDateType()
           
 
Method Summary
 void addScalar(SqlQuery query, String dbName, Class<?> attributeType)
          Declares a scalar query result, which is an SQL query execution output value.
 Class<?>[] getClassTypes()
          The list of Java class types related to this META type.
 String[] getMetaTypes()
          The list of names of this META type.
 void setParameter(SqlQuery query, String paramName, Object inputValue, Class<?> inputType, boolean ingoreError)
          Binds an input value to a named query parameter.
 void setResult(Object pojo, 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.SqlProviderType
getProviderSqlNullType, getProviderSqlType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlFromDateType

public SqlFromDateType()
Method Detail

getClassTypes

public Class<?>[] getClassTypes()
The list of Java class types related to this META type.

Specified by:
getClassTypes in class SqlInternalType

getMetaTypes

public String[] getMetaTypes()
The list of names of this META type. These names can be used in the META SQL statements.

Specified by:
getMetaTypes in class SqlInternalType

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 staff
dbName - the name of a database query output, it can be the column name or the alias name
attributeType - the Java type of of the attribute in the result class

setResult

public void setResult(Object pojo,
                      String attributeName,
                      Object resultValue,
                      boolean ingoreError)
Initializes the attribute of the result class with output value from the SQL query execution.

Specified by:
setResult in class SqlMetaType
Parameters:
pojo - the instance of the result class
attributeName - the name of the attribute in the result class
resultValue - the query execution output value
ingoreError - ignore improper output value handling

setParameter

public void setParameter(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:
query - the SQL Engine query, an adapter or proxy to the internal JDBC or ORM staff
paramName - the name of the parameter
inputValue - the possibly-null parameter value, a dynamic input value
ingoreError - ignore improper input value handling
Throws:
SqlRuntimeException - in the case of any problem with the input values handling


Copyright © 2014. All Rights Reserved.