com.poscoict.glueframework.dao.mybatis
Class GlueMybatisDao

java.lang.Object
  extended by com.poscoict.glueframework.dao.mybatis.GlueMybatisDao
All Implemented Interfaces:
GlueGenericDao

public class GlueMybatisDao
extends Object
implements GlueGenericDao

MybatisDAO. Mybatis ¶óÀ̺귯¸®¸¦ ÀÌ¿ëÇÑ µ¥ÀÌŸº£À̽º CRUD(Create, Read, Update, Delete) ¿ÀÆÛ·¹À̼ÇÀ» Á¦°øÇÏ´Â Data Access Object
Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID¸¦ ÆĶó¸ÞÅÍ·Î ³Ñ°ÜÁÖ¾î¾ß ÇÏ¸ç ¹ÙÀεù µÇ´Â °ªÀÌ ÀÖÀ» °æ¿ì¿¡´Â GlueParameterµµ ÇÕ²² ³Ñ°ÜÁÖ¾î¾ß ÇÑ´Ù.


Constructor Summary
GlueMybatisDao()
           
 
Method Summary
 int delete(String queryKey)
          delete SQLÀ» ¼öÇàÇÑ´Ù..
<P> int
delete(String queryKey, GlueParameter<P> param)
          delete SQLÀ» ¼öÇàÇÑ´Ù..
<T> List<T>
find(String queryKey)
          select SQLÀ» ¼öÇàÇÑ´Ù..
<T,P> List<T>
find(String queryKey, GlueParameter<P> param)
          select SQLÀ» ¼öÇàÇÑ´Ù..
 org.apache.ibatis.session.SqlSession getSqlSession()
           
 int insert(String queryKey)
          insert SQLÀ» ¼öÇàÇÑ´Ù..
<P> int
insert(String queryKey, GlueParameter<P> param)
          insert SQLÀ» ¼öÇàÇÑ´Ù..
 void setSqlSession(org.apache.ibatis.session.SqlSession sqlSession)
          setter method for DI.
 int update(String queryKey)
          update SQLÀ» ¼öÇàÇÑ´Ù..
<P> int
update(String queryKey, GlueParameter<P> param)
          update SQLÀ» ¼öÇàÇÑ´Ù..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueMybatisDao

public GlueMybatisDao()
Method Detail

getSqlSession

public org.apache.ibatis.session.SqlSession getSqlSession()

setSqlSession

public void setSqlSession(org.apache.ibatis.session.SqlSession sqlSession)
setter method for DI.

Parameters:
sqlSession -

delete

public int delete(String queryKey)
delete SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
delete in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
Returns:
Àû¿ëµÈ Row ¼ö

delete

public <P> int delete(String queryKey,
                      GlueParameter<P> param)
delete SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
delete in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
param - Äõ¸®¿¡ ¹ÙÀεù µÉ °ªµéÀÌ Á¤ÀÇµÈ °´Ã¼ ,VO°´Ã¼ ȤÀº MAPÀ» »ý¼ºÇÏ¿© GlueParameter¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
Returns:
Àû¿ëµÈ Row ¼ö

find

public <T> List<T> find(String queryKey)
select SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
find in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
Returns:
selectµÈ °á°ú List

find

public <T,P> List<T> find(String queryKey,
                          GlueParameter<P> param)
select SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
find in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
param - Äõ¸®¿¡ ¹ÙÀεù µÉ °ªµéÀÌ Á¤ÀÇµÈ °´Ã¼ ,VO°´Ã¼ ȤÀº MAPÀ» »ý¼ºÇÏ¿© GlueParameter¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
Returns:
selectµÈ °á°ú List

insert

public int insert(String queryKey)
insert SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
insert in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
Returns:
Àû¿ëµÈ Row ¼ö

insert

public <P> int insert(String queryKey,
                      GlueParameter<P> param)
insert SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
insert in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
param - Äõ¸®¿¡ ¹ÙÀεù µÉ °ªµéÀÌ Á¤ÀÇµÈ °´Ã¼ ,VO°´Ã¼ ȤÀº MAPÀ» »ý¼ºÇÏ¿© GlueParameter¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
Returns:
Àû¿ëµÈ Row ¼ö

update

public int update(String queryKey)
update SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
update in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
Returns:
Àû¿ëµÈ Row ¼ö

update

public <P> int update(String queryKey,
                      GlueParameter<P> param)
update SQLÀ» ¼öÇàÇÑ´Ù..

Specified by:
update in interface GlueGenericDao
Parameters:
queryKey - Mybatis Mapper XML¿¡ Á¤ÀÇµÈ Query ID
param - Äõ¸®¿¡ ¹ÙÀεù µÉ °ªµéÀÌ Á¤ÀÇµÈ °´Ã¼ ,VO°´Ã¼ ȤÀº MAPÀ» »ý¼ºÇÏ¿© GlueParameter¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
Returns:
Àû¿ëµÈ Row ¼ö


Copyright © 2013–2018 POSCO ICT. All rights reserved.