org.sqlproc.engine.hibernate.type
Class HibernateType

java.lang.Object
  extended by org.sqlproc.engine.type.SqlMetaType
      extended by org.sqlproc.engine.hibernate.type.HibernateType

public class HibernateType
extends SqlMetaType

The general Hibernate META type.

Author:
Vladimir Hudec

Field Summary
private  org.hibernate.type.Type hibernateType
          The Hibernate type.
(package private) static Map<String,Field> hibernateTypes
          The map between the Hibernate types names and the Hibernate types.
protected static org.slf4j.Logger logger
          The internal slf4j logger.
 
Constructor Summary
HibernateType(String sMetaType)
          Creates a new instance of general Hibernate type based on the declaration in the META SQL statement.
 
Method Summary
 void addScalar(SqlQuery query, String dbName, Class<?> attributeType)
          
 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

logger

protected static final org.slf4j.Logger logger
The internal slf4j logger.


hibernateTypes

static Map<String,Field> hibernateTypes
The map between the Hibernate types names and the Hibernate types.


hibernateType

private org.hibernate.type.Type hibernateType
The Hibernate type. A standard way to assign the type of a parameter/scalar binding to the Hibernate Query.

Constructor Detail

HibernateType

public HibernateType(String sMetaType)
Creates a new instance of general Hibernate type based on the declaration in the META SQL statement.

Parameters:
sMetaType - the name of the Hibernate type, for example INTEGER
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


Copyright © 2013. All Rights Reserved.