java - Mapping a Object map property to Map using Dozer -


how can map map object property values map using dozer.

here class :

public class simplepojo { private string field1; private string field2; private map<string, string> attributes = new hashmap<string, string>();  public string getfield1() {     return field1; }  public void setfield1(string field1) {     this.field1 = field1; }  public string getfield2() {     return field1; }  public void setfield2(string field2) {     this.field2 = field2; }  public map<string, string> getattributes() {     return attributes; }  public void setattributes(map<string, string> attributes) {     this.attributes = attributes; } 

}

attributes map having key-value pairs <key1-value1> etc. data should go object properties key-value pair resulting map.

how can mapping?

personally haven't tried dozer documentation has details, have tried this?

http://dozer.sourceforge.net/documentation/mapbackedproperty.html


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -