public ParameterType getParameterType() { return parameterType == null ? null : ParameterType.fromId(parameterType); }
public void setParameterType(ParameterType parameterType) { this.parameterType = parameterType == null ? null : parameterType.getId(); }
protected boolean isParameterDateOrTime() { ReportInputParameter parameter = getItem(); return Optional.ofNullable(parameter) .map(reportInputParameter -> ParameterType.DATE.equals(parameter.getType()) || ParameterType.DATETIME.equals(parameter.getType()) || ParameterType.TIME.equals(parameter.getType())) .orElse(false); } }
protected InputParameterInfo mapInputParameterInfo(ReportInputParameter parameter) { InputParameterInfo inputParameterInfo = new InputParameterInfo(); inputParameterInfo.name = parameter.getName(); inputParameterInfo.alias = parameter.getAlias(); if (parameter.getType() != null) { inputParameterInfo.type = parameter.getType().toString(); } inputParameterInfo.required = Boolean.TRUE.equals(parameter.getRequired()); inputParameterInfo.hidden = Boolean.TRUE.equals(parameter.getHidden()); if (parameter.getEntityMetaClass() != null) { inputParameterInfo.entityMetaClass = parameter.getEntityMetaClass(); } if (parameter.getEnumerationClass() != null) { inputParameterInfo.enumerationClass = parameter.getEnumerationClass(); } return inputParameterInfo; }
public void setType(ParameterType type) { this.type = type != null ? type.getId() : null; }
@Override protected Collection<ReportInputParameter> getCollection() { return super.getCollection().stream() .filter(reportInputParameter -> reportInputParameter.getType().equals(ParameterType.TEXT)) .collect(Collectors.toList()); } }
public ParameterType getType() { return type != null ? ParameterType.fromId(type) : null; }