Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Object mapping any Patterns

 
Sunil Pandit
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a situation where i have to map attributes from business objects to EIS specific keywords. Are there any patterns for such mapping ?
For example lets say we have a EIS system such as CICS which consumes a message in form of key value pair separated by some separator . The value of these keys comes from one or more attributes from the business objects . How do we represent this mapping ? Is there any metadata definition or Is there any pattern ? I will illustrate above scenario with an example. Lets say we have a Person object with some attributes as firstName, lastName , Street , House No, City , State , Zip code. When I have to store this object in CICS system the message I have to construct will be FNAME=;LNAME=;ADDR1=;ADDR2;ADDR3=;

I think this is very common problem where the Domain model is different from the data model.

Any suggestions ?
 
Zeeshan Samdani
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunil,

You could try constructing a key/ value map of attribute names and message names and write a helper class which will move the data according to the map.

This may be a little less efficient, but should do the trick. There are big iron solutions available in this area, but these tend to cost.


Zeeshan Samdani
www.powermapjdo.com
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!