You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.7 KiB
66 lines
1.7 KiB
/* |
|
* Copyright (C), 2018-2022 |
|
* Project: starter |
|
* FileName: Parameter |
|
* Author: Louis |
|
* Date: 2022/3/11 15:33 |
|
*/ |
|
package com.fr.plugin.tabledataservice.bean; |
|
|
|
import com.fanruan.api.util.StringKit; |
|
import com.fr.json.JSONException; |
|
|
|
import javax.xml.bind.annotation.*; |
|
|
|
/** |
|
* <Function Description><br> |
|
* <Parameter> |
|
* |
|
* @author fr.open |
|
* @since 1.0.0 |
|
*/ |
|
@XmlAccessorType(XmlAccessType.FIELD) |
|
@XmlType(name = "OrderParameter", propOrder = {"name", "type", "value"}) |
|
@XmlRootElement(name = "parameter") |
|
public class Parameter { |
|
@XmlElement(name = "name", required = true) |
|
private String name; |
|
@XmlElement(name = "type", required = true) |
|
private String type; |
|
@XmlElement(name = "value", required = true) |
|
private String value; |
|
|
|
public static com.fr.base.Parameter getParameter(Parameter parameter) throws JSONException { |
|
com.fr.base.Parameter parameterFR = new com.fr.base.Parameter(); |
|
parameterFR.setName(parameter.getName()); |
|
if (StringKit.isNotBlank(parameter.getValue())) { |
|
ParameterTypeXMLHandler handler = ParameterTypeXMLHandler.valueOf(parameter.getType()); |
|
return handler.parseJson(parameter, parameterFR); |
|
} |
|
return parameterFR; |
|
} |
|
|
|
public String getName() { |
|
return name; |
|
} |
|
|
|
public void setName(String name) { |
|
this.name = name; |
|
} |
|
|
|
public String getType() { |
|
return type; |
|
} |
|
|
|
public void setType(String type) { |
|
this.type = type; |
|
} |
|
|
|
public String getValue() { |
|
return value; |
|
} |
|
|
|
public void setValue(String value) { |
|
this.value = value; |
|
} |
|
} |