com.poscoict.glueframework.dao.hibernate
Class GlueHibernateTemplate

java.lang.Object
  extended by org.springframework.orm.hibernate3.HibernateAccessor
      extended by org.springframework.orm.hibernate3.HibernateTemplate
          extended by com.poscoict.glueframework.dao.hibernate.GlueHibernateTemplate
Type Parameters:
P -
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.InitializingBean, org.springframework.orm.hibernate3.HibernateOperations

public class GlueHibernateTemplate
extends org.springframework.orm.hibernate3.HibernateTemplate

ÀÌ Å¬·¡½º´Â Hibernate Template Ŭ·¡½ºÀÌ´Ù.


Field Summary
 
Fields inherited from class org.springframework.orm.hibernate3.HibernateAccessor
FLUSH_ALWAYS, FLUSH_AUTO, FLUSH_COMMIT, FLUSH_EAGER, FLUSH_NEVER, logger
 
Constructor Summary
GlueHibernateTemplate(org.hibernate.SessionFactory sessionFactory)
          Create a new HibernateTemplate instance.
 
Method Summary
 Object createEntity(Object entity)
           
<P> Object
createEntity(String entityName, GlueParameter<P> param)
          ÁÖ¾îÁø entityName¿Í GlueParameter Á¤º¸·Î Entity¸¦ »ý¼ºÇÏ¿© DB¿¡ ¹Ý¿µ(Insert)ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.
<T,P> List<T>
find(String hql, GlueParameter<P> param)
          ÁÖ¾îÁø Query¿Í GlueParameter Á¤º¸·Î Á¶È¸ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.
 Object getEntity(String entityName, Serializable entityId)
          ÁÖ¾îÁø entityName¿Í entityId Á¤º¸·Î °´Ã¼¸¦ ¹ÝȯÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.
<P> Object
modifyEntity(String entityName, Object entity, GlueParameter<P> param)
           
 Object removeEntity(Object entity)
           
 Object removeEntity(String entityName, Serializable entityId)
          ÁÖ¾îÁø entityName¿Í entityId Á¤º¸·Î Hibernate °´Ã¼¸¦ »èÁ¦ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.
<P> Integer
update(String hql, GlueHibernateParameter<P> param)
          ÁÖ¾îÁø Query¿Í GlueParameter Á¤º¸·Î Update/DeleteÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.
 
Methods inherited from class org.springframework.orm.hibernate3.HibernateTemplate
applyNamedParameterToQuery, bulkUpdate, bulkUpdate, bulkUpdate, checkWriteOperationAllowed, clear, closeIterator, contains, createSessionProxy, delete, delete, delete, delete, deleteAll, doExecute, enableFilter, evict, execute, executeFind, executeWithNativeSession, executeWithNewSession, find, find, find, findByCriteria, findByCriteria, findByExample, findByExample, findByExample, findByExample, findByNamedParam, findByNamedParam, findByNamedQuery, findByNamedQuery, findByNamedQuery, findByNamedQueryAndNamedParam, findByNamedQueryAndNamedParam, findByNamedQueryAndValueBean, findByValueBean, flush, get, get, get, get, getFetchSize, getMaxResults, getQueryCacheRegion, getSession, initialize, isAllowCreate, isAlwaysUseNewSession, isCacheQueries, isCheckWriteOperations, isExposeNativeSession, iterate, iterate, iterate, load, load, load, load, load, loadAll, lock, lock, merge, merge, persist, persist, prepareCriteria, prepareQuery, refresh, refresh, replicate, replicate, save, save, saveOrUpdate, saveOrUpdate, saveOrUpdateAll, setAllowCreate, setAlwaysUseNewSession, setCacheQueries, setCheckWriteOperations, setExposeNativeSession, setFetchSize, setMaxResults, setQueryCacheRegion, update, update, update, update
 
Methods inherited from class org.springframework.orm.hibernate3.HibernateAccessor
afterPropertiesSet, applyFlushMode, convertHibernateAccessException, convertJdbcAccessException, convertJdbcAccessException, disableFilters, enableFilters, flushIfNecessary, getDefaultJdbcExceptionTranslator, getEntityInterceptor, getFilterNames, getFlushMode, getJdbcExceptionTranslator, getSessionFactory, setBeanFactory, setEntityInterceptor, setEntityInterceptorBeanName, setFilterName, setFilterNames, setFlushMode, setFlushModeName, setJdbcExceptionTranslator, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueHibernateTemplate

public GlueHibernateTemplate(org.hibernate.SessionFactory sessionFactory)
Create a new HibernateTemplate instance.

Parameters:
sessionFactory - SessionFactory to create Sessions
Method Detail

find

public <T,P> List<T> find(String hql,
                          GlueParameter<P> param)
ÁÖ¾îÁø Query¿Í GlueParameter Á¤º¸·Î Á¶È¸ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.

Parameters:
hql - Á¶È¸ÇÒ Query
parameter - GlueHibernateParameter¸¦ ³Ñ°Ü¾ß ÇÔ.
Returns:
List Á¶È¸ÇÑ °á°ú·Î value objectÀÇ List.

update

public <P> Integer update(String hql,
                          GlueHibernateParameter<P> param)
ÁÖ¾îÁø Query¿Í GlueParameter Á¤º¸·Î Update/DeleteÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.

Type Parameters:
T -
Parameters:
hql - update/delete hql
parameter - GlueHibernateParameter¸¦ ³Ñ°Ü¾ß ÇÔ.
Returns:
Integer UpdateÇÑ ¼ö.

getEntity

public Object getEntity(String entityName,
                        Serializable entityId)
ÁÖ¾îÁø entityName¿Í entityId Á¤º¸·Î °´Ã¼¸¦ ¹ÝȯÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.

Parameters:
entityName - ¿£Æ¼Æ¼¸í
entityId - ¿£Æ¼Æ¼ Id
Returns:
Object Á¶È¸ÇÑ Hibernate °´Ã¼

createEntity

public <P> Object createEntity(String entityName,
                               GlueParameter<P> param)
ÁÖ¾îÁø entityName¿Í GlueParameter Á¤º¸·Î Entity¸¦ »ý¼ºÇÏ¿© DB¿¡ ¹Ý¿µ(Insert)ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.

Type Parameters:
P -
Parameters:
entityName - »ý¼ºÇÒ Entity Name
parameter - GlueHibernateParameter·Î GlueContext¿¡ »ý¼º ½Ã ¸ÅÇÎÇÒ °ªÀ» °¡Áö°í ÀÖ¾î¾ß ÇÑ´Ù.
Returns:
Object »ý¼ºÇÑ Entity

modifyEntity

public <P> Object modifyEntity(String entityName,
                               Object entity,
                               GlueParameter<P> param)

createEntity

public Object createEntity(Object entity)

removeEntity

public Object removeEntity(String entityName,
                           Serializable entityId)
ÁÖ¾îÁø entityName¿Í entityId Á¤º¸·Î Hibernate °´Ã¼¸¦ »èÁ¦ÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù.

Parameters:
entityName - ¿£Æ¼Æ¼¸í
entityId - ¿£Æ¼Æ¼ Id
Returns:
null nullÀ» ¹ÝȯÇÑ´Ù.

removeEntity

public Object removeEntity(Object entity)


Copyright © 2013–2014 POSCO ICT SWÁ¦Ç°±â¼úÆÀ. All rights reserved.