本文整理汇总了Java中ro.nextreports.engine.queryexec.QueryParameter.getName方法的典型用法代码示例。如果您正苦于以下问题:Java QueryParameter.getName方法的具体用法?Java QueryParameter.getName怎么用?Java QueryParameter.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ro.nextreports.engine.queryexec.QueryParameter
的用法示例。
在下文中一共展示了QueryParameter.getName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParametersValues
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
public Map<String, Object> getParametersValues() throws RuntimeParameterException {
parametersValues = new HashMap<String, Object>();
parametersIgnore = new HashMap<String, Boolean>();
boolean exception = false;
String exceptionText = "";
for (int i = 0; i < paramList.size(); i++) {
QueryParameter qp = paramList.get(i);
String paramName = qp.getName();
if (qp.isHidden()) {
initHiddenParameterValues(qp);
continue;
}
Object value = getParameterValue(qp);
parametersValues.put(paramName, value);
parametersIgnore.put(paramName, checks.get(i).isSelected());
}
if (exception) {
throw new RuntimeParameterException(exceptionText);
}
return parametersValues;
}
示例2: getParametersValues
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
public Map<String, Object> getParametersValues() throws Exception {
Map<String, Object> parametersValues = new HashMap<String, Object>();
for (int i = 0; i < parameters.size(); i++) {
QueryParameter parameter = parameters.get(i);
if (parameter.isIgnore()) {
continue;
}
JComponent component = getParameterComponent(i);
Object value = getParameterValue(component, parameter);
String name = parameter.getName();
parametersValues.put(name, value);
}
return parametersValues;
}
示例3: isValidSqlWithMessage
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
/**
* Test if sql from a report object and sql from all parameter sources (if any) are valid
*
* @param con database connection
* @param report report object
* @return return message error if sql is not valid, null otherwise
*/
public static String isValidSqlWithMessage(Connection con, Report report) {
String sql = getSql(report);
List<QueryParameter> parameters = report.getParameters();
String message = isValidSqlWithMessage(con, sql, parameters);
if (message == null) {
for (QueryParameter qp : parameters) {
if (qp.isManualSource()) {
String parMessage = isValidSqlWithMessage(con, qp.getSource(), parameters);
if (parMessage != null) {
parMessage = "Parameter '" + qp.getName() + "'\n" + parMessage;
return parMessage;
}
}
}
}
return message;
}
示例4: 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;
}
示例5: setParameterIgnore
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
private void setParameterIgnore(Map<String, Boolean> paramIgnore) {
if (paramIgnore == null) {
return;
}
for (int i = 0; i < paramList.size(); i++) {
QueryParameter qp = paramList.get(i);
if (qp.isHidden()) {
continue;
}
String paramName = qp.getName();
JCheckBox cb = checks.get(i);
Boolean value = paramIgnore.get(paramName);
if (value == null) {
cb.setSelected(false);
continue;
}
if (value) {
cb.setSelected(true);
} else {
cb.setSelected(false);
}
}
}
示例6: getValueAt
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
public Object getValueAt(int rowIndex, int columnIndex) {
QueryParameter row = (QueryParameter) elements.get(rowIndex);
switch (columnIndex) {
case 0:
return row.getName();
case 1:
return row.getValueClassName();
default:
return null;
}
}
示例7: addParameter
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
public void addParameter(QueryParameter parameter) {
if (parameter == null) {
throw new IllegalArgumentException("null");
}
String paramName = parameter.getName();
if ((paramName == null) || (paramName.trim().length() == 0)) {
throw new IllegalArgumentException("name");
}
parameters.put(paramName, parameter);
RuntimeParametersPanel.resetParametersValues();
}
示例8: deleteParameter
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
public void deleteParameter(QueryParameter parameter) {
if (parameter == null) {
throw new IllegalArgumentException("null");
}
String paramName = parameter.getName();
if ((paramName == null) || (paramName.trim().length() == 0)) {
throw new IllegalArgumentException("name");
}
parameters.remove(paramName);
RuntimeParametersPanel.resetParametersValues();
}
示例9: parametersAreForStoredProcedure
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
/**
* Test if all parameters are for stored procedure call
* @return the name of the first parameter that is not for a stored procedure call, null if all parameters
* are ok
*/
public String parametersAreForStoredProcedure() {
List<QueryParameter> parameters = getParameters();
for (QueryParameter p : parameters) {
if (!p.isProcedureParameter()) {
return p.getName();
}
}
return null;
}
示例10: 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;
}
示例11: 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;
}
示例12: initStaticDefaultParameterValues
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
/**
* Init parameter values map with the static default values of a parameter
*
* @param param parameter
* @param parameterValues map of parameter values
* @throws QueryException if could not get default parameter values
*/
public static void initStaticDefaultParameterValues(QueryParameter param,
Map<String, Object> parameterValues) throws QueryException {
List<Serializable> defValues;
if ((param.getDefaultValues() != null) && (param.getDefaultValues().size() > 0)) {
defValues = param.getDefaultValues();
} else {
throw new QueryException(
"Invalid use of method initStaticDefaultParameterValues : no static values for parameter "
+ param.getName());
}
initDefaultParameterValues(param, defValues, parameterValues);
}
示例13: 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;
}
示例14: 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;
}
示例15: createItem
import ro.nextreports.engine.queryexec.QueryParameter; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void createItem(final ListItem<QueryParameter> item) {
super.createItem(item);
// add dynamic label and checkbox only for scheduler
final QueryParameter parameter = item.getModelObject();
boolean hasDefaultSource = (parameter.getDefaultSource() != null) && (parameter.getDefaultSource().trim().length() > 0);
boolean hasSource = (parameter.getSource() != null) && (parameter.getSource().trim().length() > 0);
final IModel dynamicModel = new PropertyModel(runtimeModel.getParameters(), parameter.getName() + ".dynamic");
enableItem(item, dynamicModel, null);
final CheckBox dynamicChkBox = new CheckBox("dynamicChkBox", dynamicModel);
dynamicChkBox.setVisible(!runNow && (hasDefaultSource || hasSource));
dynamicChkBox.add(new AjaxFormComponentUpdatingBehavior("onchange") {
protected void onUpdate(AjaxRequestTarget target) {
enableItem(item, dynamicModel, target);
}
});
item.add(dynamicChkBox.setOutputMarkupId(true));
Label dynamicLabel = new Label("dynamicLabel", getString("DynamicParameterRuntimePanel.dynamic"));
dynamicLabel.setVisible(!runNow && (hasDefaultSource || hasSource));
item.add(dynamicLabel.setOutputMarkupId(true));
}