cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a generic populator

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (0)