com.poscoict.glueframework.message.layout
Class GlueDBMessageLayout

java.lang.Object
  extended by com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
      extended by com.poscoict.glueframework.message.layout.GlueDBMessageLayout
All Implemented Interfaces:
GlueMessageLayout, DisposableBean, InitializingBean

public class GlueDBMessageLayout
extends GlueAbstractFixedLengthMessageLayout

MessageLayout ±¸Çöü. Message¸¦ DB¿¡ Á¤ÀÇµÈ Layout¿¡ µû¶ó Create, Parsing½Ã »ç¿ëÇÒ¼ö ÀÖµµ·Ï ±¸ÇöµÈ Implement Class. GlueDBMessageLayout Class´Â Master DB·Î ºÎÅÍ TC¿¡ ÇØ´çÇÏ´Â Layout Á¤º¸¸¦ ÀÐ¾î ¿Í¼­ TC¸¦ Parse Çϰųª Create ÇÏ°Ô ÇÑ´Ù.

 Bean Property
 
 - cacheManager : (Çʼö) applicationContext.xml ÀÇ Cache ManagerÀÇ bean id.
 
 - dao : (Çʼö) applicationContext.xml ÀÇ DaoÀÇ bean id.
 
 - msgParsingType : (¼±ÅÃ) default´Â 'byte'
    Àû¿ë ¿ì¼±¼øÀ§
    1. msgParsingType bean propertyÀÇ °ª
    2. glue.properties ÀÇ msg.parsing.type ¿¡ ÇØ´çÇÏ´Â °ª
    3. default °ª
 
 - charset : (¼±ÅÃ) default´Â java.nio.charset.Charset.defaultCharset() °ªÀÓ.
 
 - queryId : (¼±ÅÃ) default´Â 'get_msg_layout_query' ÀÓ.
   query file¿¡ query id°¡ 'get_msg_layout_query' ÀÌ ¾Æ´Ò °æ¿ì »ç¿ëÇÑ´Ù.
 
 - msgParsingRule : (¼±ÅÃ)
 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
         <property name="dao" ref="masterdao"/>
         <property name="cacheManager" ref="cacheManager"/>
     </bean>
     <bean id="masterdao" class=". . ."/>
     <bean id="cacheManager" class=". . ."/>
 
 
 »ç¿ë ¿¹# 2
 
     <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
         <property name="dao" ref="masterdao"/>
         <property name="cacheManager" ref="cacheManager"/>
         <property name="queryId" value="get_msg_layout_query"/>
     </bean>
     <bean id="masterdao" class=". . ."/>
     <bean id="cacheManager" class=". . ."/>
 
 
 »ç¿ë ¿¹# 3
 
     <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
         <property name="dao" ref="masterdao"/>
         <property name="cacheManager" ref="cacheManager"/>
         <property name="msgParsingType" value="byte"/>
     </bean>
     <bean id="masterdao" class=". . ."/>
     <bean id="cacheManager" class=". . ."/>
 
 
 »ç¿ë ¿¹# 4
 
     <bean id="layoutInDB" class="com.poscoict.glueframework.message.layout.GlueDBMessageLayout">
         <property name="dao" ref="masterdao"/>
         <property name="cacheManager" ref="cacheManager"/>
         <property name="msgParsingType" value="byte"/>
         <property name="msgParsingRule">
             <list>
                 <value>NULL_TO_ZERO_WHEN_TYPE_IS_NUMBER</value>
                 <value>ZERO_TO_SPACE_WHEN_TYPE_IS_STRING</value>
             </list>
         </property>
     </bean>
     <bean id="masterdao" class=". . ."/>
     <bean id="cacheManager" class=". . ."/>
 
 
 Âü°í : [MSGFW001]-service.xml
 
     <activity name="MessageParse" class="com.poscoict.glueframework.biz.activity.GlueMessageParse">
         <transition name="success" value="BizLogic" />
         <property name="layout" value="layoutInDB" />
     </activity>
 
 Âü°í : [layout]-query.glue_sql
 
     <?xml version="1.0" encoding="UTF-8"?> 
     <queryMap desc="LayoutÁ¶È¸¿ë">
         <query id="get_msg_layout_query" desc="com/poscoict/glueframework/message/layout/schema-sqlite.sql Âü°í" resultType="" isNamed="false">
             <![CDATA[
     SELECT MDL_DEFINE_DT_NM_SEQ,
       MDL_DEFINE_DT_NM_GROUP_TP,
       STANDARD_ENGLISH_ID,
       STANDARD_KOREAN_NAME,
       MDL_DEFINE_DT_NM_DATA_TP,
       MDL_DEFINE_DT_NM_LEN,
       MDL_DEFINE_DT_NM_V_DECI_PREC
     FROM TB_M00_INTERFACE_ATTRS
     WHERE MDL_DEFINE_NM=?
           ]]>
         </query>
     </queryMap>
 


Field Summary
 
Fields inherited from class com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
logger, MSG_TYPE_BYTE, MSG_TYPE_STRING, RULE_NUMBER_NULL_TO_ZERO, RULE_STRING_ZERO_TO_SPACE
 
Constructor Summary
GlueDBMessageLayout()
           
 
Method Summary
 void afterPropertiesSet()
           
 GlueMessage createMessageObject(String tc)
           
 List<GlueMessageAttributeDefinition> getAttributesDefinition(String tcid)
           
 GlueGenericJdbcDao getDao()
           
 String getQueryId()
           
 void setDao(GlueGenericJdbcDao dao)
          setter method for DI.
 void setQueryId(String queryId)
          setter method for DI.
 
Methods inherited from class com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
destroy, getAttributes, getCacheManager, getCharset, getMsgParsingRule, getMsgParsingType, makeMessageParsing, makeMessageString, setCacheManager, setCharset, setMsgParsingRule, setMsgParsingType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueDBMessageLayout

public GlueDBMessageLayout()
Method Detail

getDao

public GlueGenericJdbcDao getDao()

setDao

public void setDao(GlueGenericJdbcDao dao)
setter method for DI.

Parameters:
dao -

getQueryId

public String getQueryId()

setQueryId

public void setQueryId(String queryId)
setter method for DI.

Parameters:
queryId -

getAttributesDefinition

public List<GlueMessageAttributeDefinition> getAttributesDefinition(String tcid)
                                                             throws GlueMessageDefinitionException
Specified by:
getAttributesDefinition in class GlueAbstractFixedLengthMessageLayout
Returns:
GlueMessageAttributeDefinition List
Throws:
GlueMessageDefinitionException

createMessageObject

public GlueMessage createMessageObject(String tc)
Specified by:
createMessageObject in class GlueAbstractFixedLengthMessageLayout
Returns:
GlueMessage

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Overrides:
afterPropertiesSet in class GlueAbstractFixedLengthMessageLayout
Throws:
Exception


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