DozerMapper / dozer

Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another.
https://dozermapper.github.io/
Apache License 2.0
2.09k stars 481 forks source link

enum convert to custom propery plz help me me #49

Closed ghost closed 7 years ago

ghost commented 11 years ago

//start public enum AccountStatus { individual(0, "enter"),//haghighi juridical(1, "enter");//hoghughi

 private final Integer index;   
 private final String title; 

AccountStatus(Integer index, String title,String persianTitle) {
    this.index = index;
    this.title = title;
}
public Integer getIndex() { return index; }
public String getTitle() { return title; }

public static AccountStatus valueOfIndex(Integer index) { for (AccountStatus type : values()) { if (type.getIndex()==index) { return type; } } throw new IllegalArgumentException( "Partnership status cannot be resolved for code " + index); } //end

how can map AccountStatus ---->Index; how can map Index ---->AccountStatus; how can map AccountStatus--->title;

garethahealy commented 7 years ago

@azizkhani ; is this still an issue? if so, can you create a github repo, that includes a unit test showing this behaviour and link it here.

garethahealy commented 7 years ago

Closing due to inactivity.