org.sqlproc.engine.impl.type
Class SqlFromDateType

java.lang.Object
  extended by org.sqlproc.engine.impl.type.SqlMetaType
      extended by org.sqlproc.engine.impl.type.SqlGenericType
          extended by org.sqlproc.engine.impl.type.SqlFromDateType

public class SqlFromDateType
extends SqlGenericType

The SQL META Types for FROMDATE.

Author:
Vladimir Hudec

Field Summary
 
Fields inherited from class org.sqlproc.engine.impl.type.SqlMetaType
CLASS_TO_TYPE_MAP, DEFAULT, ENUM_INT, ENUM_STRING, logger, META_TO_TYPE_MAP, TYPES
 
Constructor Summary
SqlFromDateType()
           
 
Method Summary
 java.lang.Class<?>[] getClassTypes()
          The list of Java class type;
 org.hibernate.type.Type getHibernateType()
          The Hibernate type.
 java.lang.String[] getMetaTypes()
          The list of String representation of the internal types, which means special processing of the input/output value.
 void setParameter(org.hibernate.Query query, java.lang.String paramName, java.lang.Object inputValue, java.lang.Class<?> inputType, boolean ingoreError)
          Bind an input value to a named query parameter.
 void setResult(java.lang.Object pojo, java.lang.String attributeName, java.lang.Object resultValue, boolean ingoreError)
          Initializes the attribute of the result class with output values from SQL query execution.
 
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

getHibernateType

public org.hibernate.type.Type getHibernateType()
The Hibernate type. A standard way to assign the type of parameter/scalar binding to the Hibernate Query.

Specified by:
getHibernateType in class SqlGenericType

getClassTypes

public java.lang.Class<?>[] getClassTypes()
The list of Java class type;

Specified by:
getClassTypes in class SqlGenericType

getMetaTypes

public java.lang.String[] getMetaTypes()
The list of String representation of the internal types, which means special processing of the input/output value.

Specified by:
getMetaTypes in class SqlGenericType

setResult

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

Overrides:
setResult in class SqlGenericType
Parameters:
pojo - the instance of the result class
attributeName - the name of the attribute in the result class
resultValue - Query execution output value
ingoreError - ignore inproper output value handling

setParameter

public void setParameter(org.hibernate.Query query,
                         java.lang.String paramName,
                         java.lang.Object inputValue,
                         java.lang.Class<?> inputType,
                         boolean ingoreError)
                  throws SqlRuntimeException
Bind an input value to a named query parameter.

Overrides:
setParameter in class SqlGenericType
Parameters:
query - the object-oriented representation of a Hibernate query
paramName - the name of the parameter
inputValue - the possibly-null parameter value, a dynamic input value
ingoreError - ignore inproper input value handling
Throws:
SqlRuntimeException - in the case of any problem with input values handling


Copyright © 2011. All Rights Reserved.