本文整理汇总了Java中ro.nextreports.engine.queryexec.QueryParameter.getRuntimeName方法的典型用法代码示例。如果您正苦于以下问题:Java QueryParameter.getRuntimeName方法的具体用法?Java QueryParameter.getRuntimeName怎么用?Java QueryParameter.getRuntimeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ro.nextreports.engine.queryexec.QueryParameter
的用法示例。
在下文中一共展示了QueryParameter.getRuntimeName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRuntimeParameterName
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private String getRuntimeParameterName(QueryParameter param) {
String s = param.getRuntimeName();
if ((s == null) || s.trim().equals("")) {
s = param.getName();
} else {
s = StringUtil.getI18nString(s, I18nManager.getInstance().getCurrentLanguage());
}
if (param.isMandatory()) {
s = "* " + s;
}
return s;
}
示例2: getParameterLabel
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private String getParameterLabel(QueryParameter parameter) {
String label = parameter.getRuntimeName();
if (isEmpty(label)) {
label = parameter.getName();
}
if (parameter.isMandatory()) {
label += " *";
}
return label;
}
示例3: getParameterName
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private String getParameterName(QueryParameter parameter) {
String name = parameter.getRuntimeName();
if ((name == null) || name.trim().equals("")) {
name = parameter.getName();
} else {
name = StringUtil.getI18nString(name,getLocaleLanguage());
}
return name;
}
示例4: getParameterName
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private String getParameterName(QueryParameter parameter) {
String name = parameter.getRuntimeName();
if ((name == null) || name.trim().equals("")) {
name = parameter.getName();
}
return name;
}
示例5: getParameterName
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private static String getParameterName(QueryParameter parameter) {
String name = parameter.getRuntimeName();
if ((name == null) || name.trim().equals("")) {
name = parameter.getName();
}
return name;
}
示例6: getParameterName
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private static String getParameterName(QueryParameter parameter) {
String name = parameter.getRuntimeName();
if ((name == null) || name.trim().equals("")) {
name = parameter.getName();
}
return name;
}
示例7: getParameterValue
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private Object getParameterValue(JComponent component, QueryParameter parameter) throws Exception {
Object value = null;
if (component instanceof JTextField) {
value = ((JTextField) component).getText();
if (value.equals("")) {
if (parameter.isMandatory()) {
throw new Exception("Value for parameter '" + parameter.getRuntimeName() + "' is not entered.");
} else {
value = null;
}
}
} else if (component instanceof JComboBox) {
JComboBox combo = (JComboBox) component;
if (combo.getSelectedIndex() == 0) {
if (parameter.isMandatory()) {
throw new Exception("Value for parameter '" + parameter.getRuntimeName() + "' is not selected.");
} else {
value = null;
}
} else {
value = combo.getSelectedItem();
}
} else if (component instanceof JList) {
value = ((JList) component).getSelectedValuesList();
if (((Object[]) value).length == 0) {
if (parameter.isMandatory()) {
throw new Exception("Value for parameter '" + parameter.getRuntimeName() + "' is not selected.");
} else {
value = new Object[]{NULL};
}
}
} else if (component instanceof JDateChooser) {
value = ((JDateChooser) component).getDate();
if (value == null) {
if (parameter.isMandatory()) {
throw new Exception("Value for parameter '" + parameter.getRuntimeName() + "' is not entered.");
}
}
} else if (component instanceof JCheckBox) {
value = ((JCheckBox) component).isSelected();
}
if (value == null) {
return value;
}
try {
if (QueryParameter.STRING_VALUE.equals(value.getClass().getName())) {
String className = parameter.getValueClassName();
value = ParameterUtil.getParameterValueFromString(className, (String)value);
}
} catch (Exception e) {
throw new Exception("Invalid parameter value " + value +
" for parameter '" + parameter.getRuntimeName() +
"' of type " + parameter.getValueClassName() + " .");
}
return value;
}