Java 类net.sf.jasperreports.engine.query.JRJdbcQueryExecuter 实例源码

项目:jasperreports    文件:DateRangeSQLLessOrGreaterClause.java   
@Override
protected ClauseFunctionParameterHandler createParameterHandler(JRQueryClauseContext queryContext, 
        String clauseId, String parameterName)
{
    Object paramValue = queryContext.getValueParameter(parameterName).getValue();
    if (paramValue != null && !(paramValue instanceof DateRange))
    {
        throw 
            new JRRuntimeException(
                EXCEPTION_MESSAGE_KEY_UNEXPECTED_PARAMETER_TYPE,
                new Object[]{parameterName, clauseId});
    }

    boolean useRangeStart;
    if (JRJdbcQueryExecuter.CLAUSE_ID_LESS.equals(clauseId) 
            || JRJdbcQueryExecuter.CLAUSE_ID_GREATER_OR_EQUAL.equals(clauseId))
    {
        useRangeStart = true;
    }
    else if (JRJdbcQueryExecuter.CLAUSE_ID_GREATER.equals(clauseId) 
            || JRJdbcQueryExecuter.CLAUSE_ID_LESS_OR_EQUAL.equals(clauseId))
    {
        useRangeStart = false;
    }
    else
    {
        throw 
            new JRRuntimeException(
                EXCEPTION_MESSAGE_KEY_UNKNOWN_CLAUSE_ID,
                new Object[]{clauseId});
    }

    return new DateRangeParameterHandler(queryContext, parameterName, 
            (DateRange) paramValue, useRangeStart);
}
项目:PDFReporter-Studio    文件:EditExpressionXDialog.java   
protected boolean isThreeOperands() {
    return function.equals(JRJdbcQueryExecuter.CLAUSE_ID_BETWEEN) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_BETWEEN_CLOSED)
            || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_BETWEEN_LEFT_CLOSED) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_BETWEEN_RIGHT_CLOSED);
}
项目:PDFReporter-Studio    文件:EditExpressionXDialog.java   
protected boolean isTwoOperands() {
    return function.equals(JRJdbcQueryExecuter.CLAUSE_ID_EQUAL) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_NOTEQUAL) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_GREATER)
            || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_GREATER_OR_EQUAL) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_LESS) || function.equals(JRJdbcQueryExecuter.CLAUSE_ID_LESS_OR_EQUAL);
}