[Design of JBoss ESB] - Smooks JavaBinding
by ama1
Hi,
I use the following configuration to bind my csv files:
<csv:reader
| fields="FILE_ID,COMP_ID,ADDR_ID,CNTY_ID,ZIP_ID,CNTRY_ID,STATE_ID,LOC_ID,TWN_ID,ADDR_L1,ADDR_L2,ADDR_STR,ADDR_NUM,ADDR_BOX,DUMMY"
| separator=";" quote=""" skipLines="1" />
|
| <jb:bindings beanId="add" class="java.util.ArrayList" createOnElement="csv-set" extendLifecycle="true">
| <jb:wiring beanIdRef="addressRecord"/>
| </jb:bindings>
| <jb:bindings beanId="addressRecord" class="java.util.HashMap" createOnElement="csv-record" extendLifecycle="true">
| <jb:value property="ADDR_ID" data="ADDR_ID"/>
| <jb:value property="CNTY_ID" data="CNTY_ID"/>
| <jb:value property="ZIP_ID" data="ZIP_ID"/>
| <jb:value property="CNTRY_ID" data="CNTRY_ID"/>
| <jb:value property="CNTRY_ID" data="CNTRY_ID"/>
| <jb:value property="STATE_ID" data="STATE_ID"/>
| <jb:value property="LOC_ID" data="LOC_ID"/>
| <jb:value property="TWN_ID" data="TWN_ID"/>
| <jb:value property="ADDR_L1" data="ADDR_L1"/>
| <jb:value property="ADDR_L2" data="ADDR_L2"/>
| <jb:value property="ADDR_STR" data="ADDR_STR"/>
| <jb:value property="ADDR_NUM" data="ADDR_NUM"/>
| <jb:value property="ADDR_BOX" data="ADDR_BOX"/>
| </jb:bindings>
The result will be a ArrayList<Map<String, Object>>. Is there a way to add an index to have this as result Map<String, Map<String, Object>>, where the Map.Key would be the index (ADDR_ID) and the Map.Value the Address entity-map?
Thanks,
Patrick
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221301#4221301
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221301
15 years, 1 month
[Design of AOP on JBoss (Aspects/JBoss)] - Re: Expose AOP debugging information
by kabir.khan@jboss.com
Hi Wouter,
We don't have the manpower right now to add this ourselves. But if you are interested in adding this yourself, you are more than welcome to do so. Please mail me directly if you are interested, so we can go through the formalities needed to get you commit access.
"Wouterdb" wrote : note 2 :Whether an advice applied to a field joinpoint is considered to be applied to the field or inside methods accessing the field and whether call joinpoints are part of the caller or the callee is unclear, this is open for discussion.
-the field joinpoint is considered to be applied to the field
-call joinpoints are part of the caller
"Wouterdb" wrote : note 3 :It is (in some cases) possible to make these methods instance methods of their first argument, but it is beyond me whether this would be a good idea
If you mean instead of
| List<AdviceApplication> applicationsFor(AdviceBinding binding)
|
doing
| class AdviceBinding{
| ...
| List<AdviceApplication> applicationsFor()
| }
|
I don't think that is a good idea, the introspective API should be as unintrusive as possible.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221262#4221262
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221262
15 years, 1 month