public class GlueJdbcNativeRun extends GlueActivity<GlueContext>
Activity Property - dao : (Çʼö) applicationContext.xmlÀÇ DAO id. - sql-key : (Çʼö) xxx-query.glue_sqlÀÇ query id À¯Çü¿¡ ¸Â´Â query¸¦ ÁöÁ¤ÇØ¾ß Çϸç, query ½ÇÇà°á°ú¿¡ µû¶ó Statement ½ÇÇà ±¸¹®ÀÌ ¸¸µé¾îÁü. sqlÀº named query¿©¾ß Çϸç, :table_name, :object_name, :package_name, :owner¸¸ named parameter·Î »ç¿ëÇÑ´Ù. ex) oracle ÀÇ °æ¿ì ´ÙÀ½ 3°¡Áö À¯Çü¿¡ ¸Â´Â SQL¸¦ »ý¼ºÇϴµ¥ »ç¿ëµÊ. 1. procedure ½ÇÇà -> {call package.procedure(:arg, :arg, ...)} 2. package ½ÇÇà -> {call procedure(:arg, :arg, ...)} 3. table Á¤ÀÇ Á¤º¸¿¡ ±â¹ÝÇÑ sql ½ÇÇà -> select * from table where column_pk = ? and ... -> insert into table(column, ...) values (?, ...) -> delete from table where column_pk = ? and ... -> update talbe set column=?, ... where column_pk = ? and ... - procedure-name : (Çʼö) ½ÇÇàÇÏ°íÀÚ ÇÏ´Â PL/SQL ÇÁ·Î½ÃÀú ¶Ç´Â ÆÐÅ°Áö À̸§. table-name °ú °°ÀÌ »ç¿ëÇÒ ¼ö ¾øÀ½. sql-key¿¡ ÇØ´çÇÏ´Â query¸¦ ½ÇÇàÇÑ °á°úÇ׸ñ(oracle.procedure.arguments, oracle.package.arguments Âü°í) - Çʼö : NAME, DATA_TYPE, IN_OUT Ç׸ñÀ» Æ÷ÇÔÇؾßÇÔ. - ¼±Åà : SECOND_NAME Ç׸ñÀº nameÀ» °¡°øÇÑ °ªÀÓ. sql»óÀÇ :package_name °ú :object_name ÀÇ °ªÀ¸·Î »ç¿ëµÊ. - aaa.bbb ÇüÅÂÀÏ°æ¿ì °æ¿ì :package_nameÀ¸·Î aaa ¸¦ :object_name¿¡´Â bbb ¸¦ ±× °ªÀ¸·Î bindÇÔ. - ccc ÇüÅÂÀÏ °æ¿ì :object_name ¿¡ ccc ¸¦ ±× °ªÀ¸·Î bindÇÔ. ½ÇÇà°á°ú´Â IN/OUT °ú OUT À¯Çü¿¡ ´ëÇØ.. {argument_name}_result ·Î GlueContext¿¡ ´ã±è. - table-name : (Çʼö) table ¸í. procedure-name °ú °°ÀÌ »ç¿ëÇÒ ¼ö ¾øÀ½. sql-key¿¡ ÇØ´çÇÏ´Â query¸¦ ½ÇÇàÇÑ °á°ú Ç׸ñ(oracle.table.primary.key Âü°í) - Çʼö NAME, DATA_TYPE, CONSTRAINT_TYPE À» Æ÷ÇÔÇؾßÇÔ. - ¼±Åà : NULLABLE Ç׸ñÀº sql ½ÇÇà½Ã bindµÇ´Â °ªÀÇ null checkÇØ´ç Ç׸ñÀÎÁö ÆÇ´ÜÇÔ.. sql»óÀÇ :table_name ÀÇ °ªÀ¸·Î »ç¿ëµÊ. - table-sql : (¼±ÅÃ) sql ó¸® À¯Çü. default´Â selectÀÓ. - select : PK(UK)¸¦ Á¶°ÇÀ¸·Î select ¼öÇà. Á¶È¸ °á°ú´Â {table-name}_resultList À¸·Î GlueContext¿¡ ´ã±è. - insert : insert ¼öÇà. µî·Ï °á°ú´Â {table-name}_result ·Î GlueContext¿¡ ´ã±è. - update : PK(UK)¸¦ Á¶°ÇÀ¸·Î update ¼öÇà. ¼öÁ¤ °á°ú´Â {table-name}_result ·Î GlueContext¿¡ ´ã±è. - delete : PK(UK)¸¦ Á¶°ÇÀ¸·Î delete ¼öÇà. »èÁ¦ °á°ú´Â {table-name}_result ·Î GlueContext¿¡ ´ã±è. - save : PK(UK)¸¦ Á¶°ÇÀ¸·Î select ¼öÇàÇÏ°í ±× °á°ú µû¶ó insert or update ¼öÇà. ÀúÀå °á°ú´Â {table-name}_result ·Î GlueContext¿¡ ´ã±è. - desert : delete and insert ¼öÇà. µî·Ï °á°ú´Â {table-name}_result ·Î GlueContext¿¡ ´ã±è. - owner : (¼±ÅÃ) : owner Á¤º¸.. oarcle »ç¿ë½Ã sql-key¿¡ ÇØ´çÇÏ´Â query¿¡¼ user_arguments°¡ ¾Æ´Ñ all_arguments¸¦ »ç¿ëÇÒ °æ¿ì owner Á¤º¸¸¦ ÁöÁ¤ÇÒ ¼ö ÀÖÀ½. sql»óÀÇ :owner ÀÇ °ªÀ¸·Î »ç¿ëµÊ. - name-bindings : (¼±ÅÃ) mapping Á¤º¸·Î name=ctxKey[|name=ctxKey...] ÇüÅÂÀÓ. parocedure-nameÀÌ »ç¿ëµÈ °æ¿ì´Â argumentName=ctxKey|argumentName=ctxKey Àǹ̷Π»ç¿ëÇÔ table-nameÀÌ »ç¿ëµÈ °æ¿ì´Â columnName=ctxKey|columnName=ctxKey Àǹ̷Π»ç¿ëÇÔ. - name-values : (¼±ÅÃ) mapping Á¤º¸·Î name=constants[|name=constants...] ÇüÅÂÀÓ. parocedure-nameÀÌ »ç¿ëµÈ °æ¿ì´Â argumentName=constant|argumentName=constant Àǹ̷Π»ç¿ëÇÔ table-nameÀÌ »ç¿ëµÈ °æ¿ì´Â columnName=constants|columnName=constants Àǹ̷Π»ç¿ëÇÔ. - null °ªÀÏ °æ¿ì 'name' ¸¸ ÀÔ·Â ÇÒ °Í - empty string ÀÏ °æ¿ì 'name=' ¸¸ ÀÔ·Â ÇÒ °Í - space ÀÏ °æ¿ì 'name= ' ¸¸ ÀÔ·Â ÇÒ °Í ==> 'a|b=|c= |d=value' ÇüÅ°¡ µÉ °ÍÀÓ. name-bindings¿Í name-valuesÀÇ ¿ì¼±¼øÀ§´Â name-values ¸¦ ¿ì¼±À¸·Î ÇÔ. - chk-name : (¼±ÅÃ) ȸéÀÇ CheckBox ID(HttpRequestÀÇ parameter name). String[] ÇüÅÂÀÇ data·Î index °ªÀ» °®´Â´Ù. - list-key : (¼±ÅÃ) Binding ÇÒ Data Context Key. List < Map < String >, < Object > > ÇüÅÂÀÇ data. ¿¹Á¦»ç¿ë ¿¹# 1 - oracle procedure ½ÇÇà : {call proc1( )} »ç¿ë ¿¹# 2 - oracle procedure ½ÇÇà : {call proc2( :P_INPUT1,:P_INPUT2 )} »ç¿ë ¿¹# 3 - oracle package ½ÇÇà : {call biz1.sub1( )} »ç¿ë ¿¹# 4 - oracle package ½ÇÇà : {call biz1.sub2( :P_INPUT1,:P_INPUT2 )} »ç¿ë ¿¹# 5 - oracle package ½ÇÇà : {call biz1.sub2( :P_INPUT1,:P_OUTPUT )} Âü°í : {name}-query.glue_sql Âü°í : 'oracle.procedure.arguments' ½ÇÇà°á°ú -------------------------------------------------- |OBJECT_ID|NAME |DATA_TYPE|IN_OUT|SECOND_NAME| |{proc1} | | |IN | | |{proc2} |P_INPUT1 |VARCHAR2 |IN |INPUT1 | |{proc2} |P_INPUT2 |NUMBER |IN/OUT|INPUT2 | |{proc2} |P_OUTPUT |NUMBER |OUT |OUTPUT | -------------------------------------------------- Âü°í : 'oracle.package.arguments' ½ÇÇà°á°ú ---------------------------------------------------- |OBJECT_ID |NAME |DATA_TYPE|IN_OUT|SECOND_NAME| |{biz1.sub1}| | |IN | | |{biz1.sub2}|P_INPUT1 |VARCHAR2 |IN |INPUT1 | |{biz1.sub2}|P_INPUT2 |NUMBER |IN/OUT|INPUT2 | |{biz1.sub2}|P_OUTPUT |NUMBER |OUT |OUTPUT | ---------------------------------------------------- Âü°í : Java Code (Custom) List
dynamicProperties, logger
Constructor and Description |
---|
GlueJdbcNativeRun() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] args) |
String |
runActivity(GlueContext ctx)
Sub Class¿¡¼ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼ È£ÃâÇÑ´Ù.
|
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
public String runActivity(GlueContext ctx)
GlueActivity
runActivity
in class GlueActivity<GlueContext>
ctx
- GlueContext¿¹)==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
public static void main(String[] args)
Copyright © 2013–2020 POSCO ICT. All rights reserved.