on 10-13-2015 10:53 AM
Hi experts,
I have some requirement.like this,
example : i want to convert C--->A type and C--->B type.
For C to A type, i had already a populator. so do i need a another populator for C to B type,or can i create a generic populator. where destination will be generic.
Please suggest me how to create a generic populator.
Thanks in advance.
To me a generic populator makes limited sense and usually you want to control which attributes you want to convert. Otherwise the whole populator mechanism was generic and would simply publish any attributes.
Aside of that you could look into generics / reflection and populate matching attibutes (another thing that usually the attributes are not guaranteed to be named the same).
Or you set up a configuration mechanism specifying the source/target fields. That could simply be property file entries like target.targetattribute=source.sourceattribute. Or an xml that you parse yourself.
The configuration approach for me only makes sense if you need a larger number of populators, if you need two or three it's still easier to just write them individually.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.