org.sqlproc.engine.impl.type
Class SqlHibernateType

java.lang.Object
  extended by org.sqlproc.engine.impl.type.SqlHibernateType

public class SqlHibernateType
extends java.lang.Object

The SQL META Types for HIBERNATE.

Author:
Vladimir Hudec

Field Summary
protected static org.slf4j.Logger logger
          The internal type, which means special processing of the input/output value.
 
Constructor Summary
SqlHibernateType()
           
 
Method Summary
static void setParameter(org.hibernate.Query query, java.lang.String paramName, java.lang.Object inputValue, java.lang.Class<?> inputType, org.hibernate.type.Type hibernateType, boolean ingoreError)
          Bind an input value to a named query parameter.
static void setResult(java.lang.Object resultInstance, java.lang.String attributeName, java.lang.Object resultValue, org.hibernate.type.Type hibernateType, 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
 

Field Detail

logger

protected static final org.slf4j.Logger logger
The internal type, which means special processing of the input/output value.

Constructor Detail

SqlHibernateType

public SqlHibernateType()
Method Detail

setResult

public static void setResult(java.lang.Object resultInstance,
                             java.lang.String attributeName,
                             java.lang.Object resultValue,
                             org.hibernate.type.Type hibernateType,
                             boolean ingoreError)
                      throws SqlRuntimeException
Initializes the attribute of the result class with output values from SQL query execution.

Parameters:
resultInstance - the instance of the result class
attributeName - the name of the attribute in the result class
resultValue - Query execution output value
hibernateType - the Hibernate type
ingoreError - ignore inproper output value handling
Throws:
SqlRuntimeException - in the case of any problem with output values handling

setParameter

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

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
hibernateType - the Hibernate type
ingoreError - ignore inproper input value handling
Throws:
SqlRuntimeException - in the case of any problem with input values handling


Copyright © 2011. All Rights Reserved.