add set required in PluginFactory

add set required in PluginFactory
This commit is contained in:
daisyonly 2014-08-26 16:30:44 +08:00
parent c93b0319db
commit 63b5cdf688
2 changed files with 12 additions and 0 deletions

View File

@ -19,6 +19,7 @@ public class ParamInfo {
private int id;
private String name;
private String lable;
private String required;
private ParamType paramType;
private ParamsContainer paramsContainer;
@ -50,6 +51,15 @@ public class ParamInfo {
public void setLable(String lable) {
this.lable = lable;
}
@Column(name = "required")
public String getRequired() {
return required;
}
public void setRequired(String required) {
this.required = required;
}
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER)
@JoinColumn(name = "typeId", nullable = false)

View File

@ -165,6 +165,8 @@ public class PluginEntityFactory {
ParamInfo paramInfo = new ParamInfo();
paramInfo.setLable(XmlParseHelper.getAttribute(paramElement, "label"));
paramInfo.setName(XmlParseHelper.getAttribute(paramElement, "name"));
paramInfo.setRequired(XmlParseHelper.getAttribute(paramElement,
"required"));
paramInfo.setParamType(ParamTypeFactory
.createParamTypeInfo(XmlParseHelper
.getSingleChild(paramElement)));