class AbstractJdbcEventAnalyticsManager {

    protected String getSelectSql( QueryItem item, Date startDate, Date endDate )
    {
        if ( item.isProgramIndicator() )
        {
            ProgramIndicator programIndicator = (ProgramIndicator)item.getItem();
            return programIndicatorService.getAnalyticsSql( programIndicator.getExpression(), programIndicator, startDate, endDate );
        }
        else
        {
            return item.isText() ? wrapLower( getColumn( item ) ) : getColumn( item );
        }
    }

    public  AbstractJdbcEventAnalyticsManager( @Qualifier( "readOnlyJdbcTemplate" ) JdbcTemplate jdbcTemplate,
        StatementBuilder statementBuilder, ProgramIndicatorService programIndicatorService,
        ProgramIndicatorSubqueryBuilder programIndicatorSubqueryBuilder );

}