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