Class HibernateType
- java.lang.Object
-
- org.sqlproc.engine.hibernate.type.HibernateType
-
- All Implemented Interfaces:
SqlMetaType
public class HibernateType extends Object implements SqlMetaType
The general Hibernate META type.- Author:
- Vladimir Hudec
-
-
Field Summary
Fields Modifier and Type Field Description private org.hibernate.type.TypehibernateTypeThe Hibernate type.(package private) static Map<String,Field>hibernateTypesThe map between the Hibernate types names and the Hibernate types.protected static org.slf4j.LoggerloggerThe internal slf4j logger.
-
Constructor Summary
Constructors Constructor Description HibernateType(String sMetaType)Creates a new instance of general Hibernate type based on the declaration in the META SQL statement.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddScalar(SqlTypeFactory typeFactory, SqlQuery query, String dbName, Class<?>... attributeTypes)ObjectgetProviderSqlType()voidsetParameter(SqlRuntimeContext runtimeCtx, SqlQuery query, String paramName, Object inputValue, boolean ingoreError, Class<?>... inputTypes)voidsetResult(SqlRuntimeContext runtimeCtx, 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
-
Methods inherited from interface org.sqlproc.engine.type.SqlMetaType
addScalarEntryLog, error, getResult, setParameterEntryLog, setResultEntryLog
-
-
-
-
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
-
getProviderSqlType
public Object getProviderSqlType()
- Specified by:
getProviderSqlTypein interfaceSqlMetaType
-
addScalar
public void addScalar(SqlTypeFactory typeFactory, SqlQuery query, String dbName, Class<?>... attributeTypes)
- Specified by:
addScalarin interfaceSqlMetaType
-
setResult
public void setResult(SqlRuntimeContext runtimeCtx, Object resultInstance, String attributeName, Object resultValue, boolean ingoreError) throws SqlRuntimeException
- Specified by:
setResultin interfaceSqlMetaType- Throws:
SqlRuntimeException
-
setParameter
public void setParameter(SqlRuntimeContext runtimeCtx, SqlQuery query, String paramName, Object inputValue, boolean ingoreError, Class<?>... inputTypes) throws SqlRuntimeException
- Specified by:
setParameterin interfaceSqlMetaType- Throws:
SqlRuntimeException
-
-