/sigmah/src/main/resources/dozer-admin-mapping.xml
XML | 68 lines | 47 code | 14 blank | 7 comment | 0 complexity | b620c5f927a03eb9405412de7046d718 MD5 | raw file
1<?xml version="1.0" encoding="UTF-8"?> 2 3<!-- 4 ~ All Sigmah code is released under the GNU General Public License v3 5 ~ See COPYRIGHT.txt and LICENSE.txt. 6 --> 7 8<mappings xmlns="http://dozer.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://dozer.sourceforge.net beanmapping.xsd "> 9 10 <!-- This mapping is for the GetCountries command, it maps only the id and 11 name of the Country object, leaving other fields blanks --> 12 <mapping wildcard="false" map-id="countryNameOnly"> 13 <class-a>org.sigmah.shared.domain.Country</class-a> 14 <class-b>org.sigmah.shared.dto.CountryDTO</class-b> 15 <field> 16 <a>id</a> 17 <b>id</b> 18 </field> 19 <field> 20 <a>name</a> 21 <b>name</b> 22 </field> 23 <!-- Adds the ISO code to this mapping to display countries full name --> 24 <field> 25 <a>codeISO</a> 26 <b>codeISO</b> 27 </field> 28 </mapping> 29 30 <mapping wildcard="true"> 31 32 <class-a>org.sigmah.shared.domain.AdminLevel</class-a> 33 <class-b>org.sigmah.shared.dto.AdminLevelDTO</class-b> 34 35 <field> 36 <a>parent.id</a> 37 <b>parentLevelId</b> 38 </field> 39 </mapping> 40 41 <mapping wildcard="true"> 42 43 <class-a>org.sigmah.shared.domain.AdminEntity</class-a> 44 <class-b>org.sigmah.shared.dto.AdminEntityDTO</class-b> 45 46 <field> 47 <a>level.id</a> 48 <b>levelId</b> 49 </field> 50 51 <field> 52 <a>parent.id</a> 53 <b>parentId</b> 54 </field> 55 </mapping> 56 57 <mapping wildcard="true"> 58 <class-a>org.sigmah.shared.domain.LocationType</class-a> 59 <class-b>org.sigmah.shared.dto.LocationTypeDTO</class-b> 60 61 <field> 62 <a>boundAdminLevel.id</a> 63 <b>boundAdminLevelId</b> 64 </field> 65 66 </mapping> 67 68</mappings>