com.poscoict.glueframework.message.layout
Class GlueDBMessageLayout
java.lang.Object
com.poscoict.glueframework.message.layout.GlueAbstractFixedLengthMessageLayout
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
사용 예# 2
사용 예# 3
사용 예# 4
NULL_TO_ZERO_WHEN_TYPE_IS_NUMBER
ZERO_TO_SPACE_WHEN_TYPE_IS_STRING
참고 : [MSGFW001]-service.xml
참고 : [layout]-query.glue_sql
| 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 |
GlueDBMessageLayout
public GlueDBMessageLayout()
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.