|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GlueGenericJdbcDao
µ¥ÀÌŸº£À̽º CRUD(Create, Read, Update, Delete) ¿ÀÆÛ·¹À̼ÇÀ» Ãß»óÈÇÏ¿© Á¦°øÇÏ´Â Data Access Object ÀÎÅÍÆäÀ̽º. ±âº»ÀûÀ¸·Î config path¿¡ À§Ä¡ÇÑ xxx-query.glue_sql ÆÄÀÏ¿¡ µî·ÏµÈ Query ¹®ÀåÀ» »ç¿ëÇÏÁö¸¸, "ByQueryStatement" ·Î ³¡³ª´Â ¸Þ¼Òµå´Â ¸í½ÃÀûÀ¸·Î Query¹®ÀåÀ» ÆĶó¸ÞÅÍ·Î ³Ñ°ÜÁÖ¾î¾ß ÇÑ´Ù.
// parameter setting List args = new ArrayList(); args.add("3500"); GlueParameter param = new GlueParameter
(args); // 1. xxx-query.glue_sql ÆÄÀÏ¿¡ µî·ÏµÈ SQL Äõ¸®¹®ÀåÀ» »ç¿ë (Äõ¸® Å°) //
// ? // ]]> // List rowsetOne = dao.find("emp.select.id", param); // 2. ¸í½ÃÀûÀÎ SQL Äõ¸®¹®ÀåÀ» »ç¿ë List rowsetTwo = dao.findByQueryStatement("select empno, ename, sal from emp where sal > ?", param);
Field Summary | |
---|---|
static int |
DEFAULT_BATCH_UPDATE_SIZE
|
static int |
DELETE
DELETE Operation »ó¼ö |
static int |
INSERT
INSERT Operation »ó¼ö |
static int |
SELECT
SELECT Operation »ó¼ö |
static int |
UPDATE
UPDATE Operation »ó¼ö |
Method Summary | ||
---|---|---|
|
batchUpdate(String queryKey,
GlueParameter<P>[] params)
JDBC 2.0 Specification¿¡ Á¤ÀÇµÈ Batch Update¸¦ ½ÇÇàÇÑ´Ù. |
|
|
batchUpdateByQueryStatement(String queryStmt,
GlueParameter<P>[] params)
JDBC 2.0 Specification¿¡ Á¤ÀÇµÈ Batch Update¸¦ ½ÇÇàÇÑ´Ù. |
|
int |
deleteByQueryStatement(String queryStmt)
SQL Äõ¸®¹®ÀåÀ» ½ÇÇàÇÏ¿© Database Record¸¦ »èÁ¦ÇÑ´Ù. |
|
|
deleteByQueryStatement(String queryStmt,
GlueParameter<P> param)
SQL Äõ¸®¹®ÀåÀ» ½ÇÇàÇÏ¿© Database Record¸¦ »èÁ¦ÇÑ´Ù. |
|
|
find(String queryKey,
String whereClause,
GlueParameter<P> param)
Äõ¸® Å°¿¡ ÇØ´çÇÏ´Â SQL Äõ¸®¹®Àå¿¡ where ÀýÀ» Àû¿ëÇÏ¿© Á¶°Ç¿¡ ÇØ´çÇÏ´Â Database Record¸¦ °Ë»öÇÑ´Ù. |
|
|
findByQueryStatement(String queryStmt)
Static SQL Äõ¸®(¹ÙÀεù º¯¼ö°¡ ¾ø´Â Äõ¸®)¸¦ ½ÇÇàÇÏ¿© Á¶°Ç¿¡ ÇØ´çÇÏ´Â Database Record¸¦ °Ë»öÇÑ´Ù. |
|
|
findByQueryStatement(String queryStmt,
GlueParameter<P> param)
SQL Äõ¸®¹®ÀåÀ» ½ÇÇàÇÏ¿© Á¶°Ç¿¡ ÇØ´çÇÏ´Â Database Record¸¦ °Ë»öÇÑ´Ù. |
|
|
findForNavigationPage(String queryKey,
GlueParameter<P> param,
int pageSize,
int curPage)
Page Set ±â´ÉÀ» Áö¿øÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù. |
|
GluePageSet |
findForNavigationPage(String queryKey,
int pageSize,
int curPage)
Page Set ±â´ÉÀ» Áö¿øÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù. |
|
|
findForNavigationPageByQuery(String queryStmt,
GlueParameter<P> param,
int pageSize,
int curPage)
Page Set ±â´ÉÀ» Áö¿øÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù. |
|
GluePageSet |
findForNavigationPageByQuery(String queryStmt,
int pageSize,
int curPage)
Page Set ±â´ÉÀ» Áö¿øÇÏ´Â ¸Þ¼ÒµåÀÌ´Ù. |
|
GlueQueryManager |
getQueryManager()
Query Manager¸¦ ¾ò´Â´Ù. |
|
GlueSequence |
getSequence()
µ¥ÀÌÅͺ£À̽º Sequence °ªÀ» Çڵ鸵ÇÏ´Â GlueSequence¸¦ ȹµæÇÑ´Ù. |
|
int |
insertByQueryStatement(String queryStmt)
SQL Äõ¸®(¹ÙÀεù º¯¼ö°¡ ¾ø´Â Äõ¸®)¸¦ ½ÇÇàÇÏ¿© Database Record¸¦ »ý¼ºÇÑ´Ù. |
|
|
insertByQueryStatement(String queryStmt,
GlueParameter<P> param)
SQL Äõ¸®¹®ÀåÀ» ½ÇÇàÇÏ¿© Database Record¸¦ »ý¼ºÇÑ´Ù. |
|
int |
updateByQueryStatement(String queryStmt)
Static SQL Äõ¸®(¹ÙÀεù º¯¼ö°¡ ¾ø´Â Äõ¸®)¸¦ ½ÇÇàÇÏ¿© Á¶°Ç¿¡ ÇØ´çÇÏ´Â Database Record¸¦ ¼öÁ¤ÇÑ´Ù. |
|
|
updateByQueryStatement(String queryStmt,
GlueParameter<P> param)
SQL Äõ¸®¹®ÀåÀ» ½ÇÇàÇÏ¿© Á¶°Ç¿¡ ÇØ´çÇÏ´Â Database Record¸¦ ¼öÁ¤ÇÑ´Ù. |
Methods inherited from interface com.poscoict.glueframework.dao.GlueGenericDao |
---|
delete, delete, find, find, insert, insert, update, update |
Field Detail |
---|
static final int SELECT
static final int UPDATE
static final int INSERT
static final int DELETE
static final int DEFAULT_BATCH_UPDATE_SIZE
Method Detail |
---|
GlueQueryManager getQueryManager()
GlueSequence getSequence()
int deleteByQueryStatement(String queryStmt)
int dmlCnt = dao.deleteByQueryStatement( "delete from emp" );
queryStmt
- SQL Äõ¸®¹®Àå
<P> int deleteByQueryStatement(String queryStmt, GlueParameter<P> param)
List args = new ArrayList(); args.add("10"); GlueParameter param = new GlueParameter
(args); int dmlCnt = dao.deleteByQueryStatement("delete from emp where deptno=?", param);
queryStmt
- SQL Äõ¸®¹®Àåparam
- ÆĶó¸ÞÅÍ
<T,P> List<T> find(String queryKey, String whereClause, GlueParameter<P> param)
param
- ÆĶó¸ÞÅÍwhereClause
- where ÀýqueryKey
- Äõ¸® Å°
<T> List<T> findByQueryStatement(String queryStmt)
List rowset = dao.findByQueryStatement( "select * from emp" );
queryStmt
- SQL Äõ¸®¹®Àå
<T,P> List<T> findByQueryStatement(String queryStmt, GlueParameter<P> param)
List args = new ArrayList(); args.add("9999"); GlueParameter param = new GlueParameter
(args); List rowset = dao.findByQueryStatement("select * from emp where empno=?", param);
param
- ÆĶó¸ÞÅÍqueryStmt
- SQL Äõ¸®¹®Àå
GluePageSet findForNavigationPage(String queryKey, int pageSize, int curPage)
curPage
- ÇöÀç ÆäÀÌÁö ¹øÈ£pageSize
- ÇÑ È¸é¿¡ Display µÉ ·Î¿ì °³¼öqueryKey
- Äõ¸® Å°
<P> GluePageSet findForNavigationPage(String queryKey, GlueParameter<P> param, int pageSize, int curPage)
curPage
- ÇöÀç ÆäÀÌÁö ¹øÈ£pageSize
- ÇÑ È¸é¿¡ Display µÉ ·Î¿ì °³¼öparam
- ¹ÙÀεù ÆĶó¸ÞÅÍqueryKey
- Äõ¸® Å°
GluePageSet findForNavigationPageByQuery(String queryStmt, int pageSize, int curPage)
GluePageSet rowset = dao.findForNavigationPageByQuery( "select * from emp", 15, 5 );
curPage
- ÇöÀç ÆäÀÌÁö ¹øÈ£pageSize
- ÇÑ È¸é¿¡ Display µÉ ·Î¿ì °³¼öqueryStmt
- SQL Äõ¸®¹®Àå
<P> GluePageSet findForNavigationPageByQuery(String queryStmt, GlueParameter<P> param, int pageSize, int curPage)
List args = new ArrayList(); args.add("10"); GlueParameter param = new GlueParameter
(args); GluePageSet rowset = dao.findForNavigationPageByQuery("select * from emp where deptno=?", param, 15, 5);
queryStmt
- SQL Äõ¸®¹®Àåparam
- ¹ÙÀεù ÆĶó¸ÞÅÍpageSize
- ÇÑ È¸é¿¡ Display µÉ ·Î¿ì °³¼öcurPage
- ÇöÀç ÆäÀÌÁö ¹øÈ£
int insertByQueryStatement(String queryStmt)
int dmlCnt = dao.insertByQueryStatement( "insert into emp(EMPNO, ENAME) values(9999,'guest')" );
queryStmt
- SQL Äõ¸®¹®Àå
<P> int insertByQueryStatement(String queryStmt, GlueParameter<P> param)
List args = new ArrayList(); args.add("9999"); args.add("guest"); GlueParameter param = new GlueParameter
(args); int dmlCnt = dao.insertByQueryStatement("insert into emp(EMPNO, ENAME) values(?,?)", param);
queryStmt
- SQL Äõ¸®¹®Àåparam
- ÆĶó¸ÞÅÍ
int updateByQueryStatement(String queryStmt)
int dmlCnt = dao.updateByQueryStatement( "update emp set ename='guest' where empno=9999" );
queryStmt
- SQL Äõ¸®¹®Àå
<P> int updateByQueryStatement(String queryStmt, GlueParameter<P> param)
List args = new ArrayList(); args.add("guest"); args.add("9999"); GlueParameter param = new GlueParameter
(args); int dmlCnt = dao.updateByQueryStatement("update emp set ename=? where empno=?", param);
queryStmt
- SQL Äõ¸®¹®Àåparam
- ÆĶó¸ÞÅÍ
<P> int[] batchUpdate(String queryKey, GlueParameter<P>[] params)
final int count = 10; // batch update¸¦ À§ÇÑ GlueParameter °´Ã¼ ¹è¿ »ý¼º GlueParameter [] params = new GlueParameter
[count]; for (int i=0; i
(args); } int[] results = dao.batchUpdate("query-key", params);
Äõ¸® Á¾·ù°¡ ¼·Î ´Ù¸£´Ù¸é °¢°¢ batchUpdate ¸Þ¼Òµå¸¦ È£ÃâÇÏ¸é µÈ´Ù. ¸®ÅϵǴ °á°ú °ªÀº sqlÀ» ½ÇÇàÇÑ °á°ú ·Î¿ì °³¼öÀÌ´Ù.
queryKey
- Äõ¸® Å°params
- GlueParameter Array
<P> int[] batchUpdateByQueryStatement(String queryStmt, GlueParameter<P>[] params)
final int count = 10; // batch update¸¦ À§ÇÑ GlueParameter °´Ã¼ ¹è¿ »ý¼º GlueParameter [] params = new GlueParameter
[count]; for (int i=0; i
(args); } int[] results = dao.batchUpdateByQueryStatement("update set
=? where =?", params); Äõ¸® Á¾·ù°¡ ¼·Î ´Ù¸£´Ù¸é °¢°¢ batchUpdate ¸Þ¼Òµå¸¦ È£ÃâÇÏ¸é µÈ´Ù. ¸®ÅϵǴ °á°ú °ªÀº sqlÀ» ½ÇÇàÇÑ °á°ú Row °³¼öÀÌ´Ù.
- Parameters:
queryStmt
- SQL Äõ¸®¹®Àåparams
- GlueParameter Array- Returns:
- °¢°¢ÀÇ Statement°¡ ¼öÇàµÈ ÈÄ ¾÷µ¥ÀÌÆ® µÈ Row °³¼ö ¹è¿
Overview Package Class Use Tree Deprecated Index Help PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD
Copyright © 2013–2016 POSCO ICT. All rights reserved.