org.sqlproc.engine.hibernate.type
Class HibernateDefaultType

java.lang.Object
  extended by org.sqlproc.engine.type.SqlMetaType
      extended by org.sqlproc.engine.hibernate.type.HibernateDefaultType
Direct Known Subclasses:
HibernateIdentityType

public class HibernateDefaultType
extends SqlMetaType

The default META type for the Hibernate stack. It's used in the case there's no explicit META type declaration in the META SQL statements.

Author:
Vladimir Hudec

Nested Class Summary
static class HibernateDefaultType.MyBigIntTypeDescriptor
          The extended Hibernate type LONG.
static class HibernateDefaultType.MyIntegerType
           
static class HibernateDefaultType.MyIntegerTypeDescriptor
          The extended Hibernate type INTEGER.
static class HibernateDefaultType.MyLongType
           
 
Field Summary
(package private) static Map<Class<?>,org.hibernate.type.Type> hibernateTypes
          The map between the Java types and the Hibernate types.
 
Fields inherited from class org.sqlproc.engine.type.SqlMetaType
logger
 
Constructor Summary
HibernateDefaultType()
           
 
Method Summary
 void addScalar(SqlQuery query, String dbName, Class<?> attributeType)
          
private  Object handleBigDecimal(Class<?> attributeType, Object resultValue)
           
 void setParameter(SqlQuery query, String paramName, Object inputValue, Class<?> inputType, boolean ingoreError)
          
 void setResult(Object resultInstance, String attributeName, Object resultValue, boolean ingoreError)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hibernateTypes

static Map<Class<?>,org.hibernate.type.Type> hibernateTypes
The map between the Java types and the Hibernate types.

Constructor Detail

HibernateDefaultType

public HibernateDefaultType()
Method Detail

addScalar

public void addScalar(SqlQuery query,
                      String dbName,
                      Class<?> attributeType)

Specified by:
addScalar in class SqlMetaType

setResult

public void setResult(Object resultInstance,
                      String attributeName,
                      Object resultValue,
                      boolean ingoreError)
               throws SqlRuntimeException

Specified by:
setResult in class SqlMetaType
Throws:
SqlRuntimeException

setParameter

public void setParameter(SqlQuery query,
                         String paramName,
                         Object inputValue,
                         Class<?> inputType,
                         boolean ingoreError)
                  throws SqlRuntimeException

Specified by:
setParameter in class SqlMetaType
Throws:
SqlRuntimeException

handleBigDecimal

private Object handleBigDecimal(Class<?> attributeType,
                                Object resultValue)


Copyright © 2013. All Rights Reserved.