Axaptapedia is now maintained by AgileCadence For more information please click here.

TableMapper

From Axaptapedia
Jump to: navigation, search

What is it?[edit]

TableMapper maps fields from one table to another automatically, if the field has the same name in both tables. It is great to easily create initFrom methods and to populate temporal tables.

Features[edit]

1- Automatic bindings between tables with a few lines.

2- Manual field bindings with the method Bind.

3- Ignore automatic bindings with the method Ignore.

Download[edit]

Download

To learn how to use it read the test class and the following example: <xpp> TableMapper mp = new TableMapper(); TestTable1 tb1; TestTable2 tb2;

mp.MapTable(tb1, tb2) .Bind("Int2", "SomeInt") .Bind("Name","FullName") .Bind("Url", "Web") .Ignore("Utc") .Map(); </xpp>