fix bug about two ParameterModel when marshal

This commit is contained in:
hmm 2014-09-22 16:44:36 +08:00
parent d186075beb
commit bfc81c62ad
1 changed files with 6 additions and 2 deletions

View File

@ -5,13 +5,15 @@ import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@XmlRootElement
public class LimitModel {
@XmlElementWrapper
@XmlElement
private List<ParameterModel> params;
@XmlElementWrapper(name = "limitParameterList")
@XmlElement(name = "limitParameter")
public List<ParameterModel> getParams() {
return params;
}
@ -20,7 +22,9 @@ public class LimitModel {
this.params = params;
}
@XmlRootElement
@XmlType(name = "limitParameterModel")
public static class ParameterModel {
private String name;
private double limit;