本文整理汇总了Java中net.sf.jasperreports.engine.JRParameter.getValueClassName方法的典型用法代码示例。如果您正苦于以下问题:Java JRParameter.getValueClassName方法的具体用法?Java JRParameter.getValueClassName怎么用?Java JRParameter.getValueClassName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.jasperreports.engine.JRParameter
的用法示例。
在下文中一共展示了JRParameter.getValueClassName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: JRBaseParameter
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
*
*/
protected JRBaseParameter(JRParameter parameter, JRBaseObjectFactory factory)
{
factory.put(parameter, this);
name = parameter.getName();
description = parameter.getDescription();
valueClassName = parameter.getValueClassName();
nestedTypeName = parameter.getNestedTypeName();
isSystemDefined = parameter.isSystemDefined();
isForPrompting = parameter.isForPrompting();
evaluationTime = parameter.getEvaluationTime();
defaultValueExpression = factory.getExpression(parameter.getDefaultValueExpression());
propertiesMap = parameter.getPropertiesMap().cloneProperties();
}
示例2: JasperReportParameterDto
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
public JasperReportParameterDto(JRParameter param) {
this.name = param.getName();
this.typeAsString = param.getValueClassName();
this.type = (Class<?>) param.getValueClass();
this.forPrompting = param.isForPrompting();
if (param.getDescription() != null){
this.description = param.getDescription();
}
this.nestedType = param.getNestedType();
this.nestedTypeAsString = param.getNestedTypeName();
this.value = new ArrayList<>();
this.value.add(new JasperReportValueDto());
this.properties = new JasperReportParameterPropertiesDto(param.getPropertiesMap());
}
示例3: verifyParameters
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
*
*/
private void verifyParameters(JRDesignDataset dataset)
{
JRParameter[] parameters = dataset.getParameters();
if (parameters != null && parameters.length > 0)
{
for(int index = 0; index < parameters.length; index++)
{
JRParameter parameter = parameters[index];
Object errorSource = parameter;
if (parameter.isSystemDefined())
{
errorSource = jasperDesign;
}
if (parameter.getName() == null || parameter.getName().trim().length() == 0)
{
addBrokenRule("Parameter name missing.", errorSource);
}
if (parameter.getValueClassName() == null)
{
addBrokenRule("Class not set for parameter : " + parameter.getName(), errorSource);
}
}
}
}
示例4: verifyQuery
import net.sf.jasperreports.engine.JRParameter; //导入方法依赖的package包/类
/**
*
*/
private void verifyQuery(JRDesignDataset dataset)
{
JRQuery query = dataset.getQuery();
if (query != null)
{
String language = query.getLanguage();
QueryExecuterFactory queryExecuterFactory = null;
if (language == null || language.length() == 0)
{
addBrokenRule("Query language not set.", query);
}
else
{
try
{
queryExecuterFactory = JRQueryExecuterUtils.getInstance(jasperReportsContext).getExecuterFactory(query.getLanguage());
}
catch (JRException e1)
{
addBrokenRule("Query executer factory for " + language + " cannot be created.", query);
}
}
JRQueryChunk[] chunks = query.getChunks();
if (chunks != null && chunks.length > 0)
{
Map<String, JRParameter> parametersMap = dataset.getParametersMap();
for(int j = 0; j < chunks.length; j++)
{
JRQueryChunk queryChunk = chunks[j];
switch (queryChunk.getType())
{
case JRQueryChunk.TYPE_PARAMETER :
{
JRParameter parameter = parametersMap.get(queryChunk.getText());
if ( parameter == null )
{
addBrokenRule("Query parameter not found : " + queryChunk.getText(), query);
}
else if (queryExecuterFactory != null)
{
String parameterType = null;
try
{
parameterType = parameter.getValueClassName();
}
catch (JRRuntimeException e)
{
// ignore, already added when the parameter got verified
}
if (parameterType != null && !queryExecuterFactory.supportsQueryParameterType(parameterType))
{
addBrokenRule("Parameter type not supported in query : " + queryChunk.getText() + " class " + parameterType, query);
}
}
break;
}
case JRQueryChunk.TYPE_PARAMETER_CLAUSE :
{
if (!parametersMap.containsKey(queryChunk.getText()))
{
addBrokenRule("Query parameter not found : " + queryChunk.getText(), query);
}
break;
}
case JRQueryChunk.TYPE_TEXT :
default :
{
}
}
}
}
}
}