Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRValueParameter


    return queryExecuter;
  }

  protected final Object getParameterValue(Map valueParams, String name)
  {
    JRValueParameter valueParam = (JRValueParameter) valueParams.get(name);
    return valueParam == null ? null : valueParam.getValue();
  }
View Full Code Here


      // Use set to prevent the parameter to be set multiple times.
      Set namesSet = new HashSet();
      for (Iterator iter = parameterNames.iterator(); iter.hasNext();) {
        String parameterName = (String)iter.next();
        if (namesSet.add(parameterName)) {
          JRValueParameter parameter = getValueParameter(parameterName);
          String ejbParamName = getEjbqlParameterName(parameterName);
          Object paramValue = parameter.getValue();
         
          if (log.isDebugEnabled())
          {
            log.debug("Parameter " + ejbParamName + ": " + paramValue);
          }
View Full Code Here

  }


  protected void setStatementParameter(int parameterIndex, String parameterName) throws SQLException
  {
    JRValueParameter parameter = getValueParameter(parameterName);
    Class clazz = parameter.getValueClass();
    Object parameterValue = parameter.getValue();
   
    if (log.isDebugEnabled())
    {
      log.debug("Parameter #" + parameterIndex + " (" + parameterName + " of type " + clazz.getName() + "): " + parameterValue);
    }
View Full Code Here

   */
  protected Object getParameterValue(String parameterName, boolean ignoreMissing)
  {
    if (ignoreMissing)
    {
      JRValueParameter parameter = getValueParameter(JRParameter.REPORT_PARAMETERS_MAP, false);
      return ((Map)parameter.getValue()).get(parameterName);
    }
   
    JRValueParameter parameter = getValueParameter(parameterName, ignoreMissing);
    return parameter == null ? null : parameter.getValue();
  }
View Full Code Here

  /**
   *
   */
  protected boolean parameterHasValue(String parameter)
  {
    JRValueParameter reportParametersMap = getValueParameter(JRParameter.REPORT_PARAMETERS_MAP, false);
    return ((Map)reportParametersMap.getValue()).containsKey(parameter);
  }
View Full Code Here

   *     otherwise, an exception will be thrown if the parameter does not exist
   * @return the parameter
   */
  protected JRValueParameter getValueParameter(String parameterName, boolean ignoreMissing)
  {
    JRValueParameter parameter = (JRValueParameter) parametersMap.get(parameterName);
   
    if (parameter == null && !ignoreMissing)
    {
      throw new JRRuntimeException("Parameter \"" + parameterName + "\" does not exist.");
    }
View Full Code Here

      for (Iterator iter = parameterNames.iterator(); iter.hasNext();)
      {
        String parameterName = (String) iter.next();
        if (namesSet.add(parameterName))
        {
          JRValueParameter parameter = getValueParameter(parameterName);
          setParameter(parameter);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRValueParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.