/** * Create an instance of {@link Selector } * */ public Selector createSelector() { return new Selector(); }
/** * Create an instance of {@link Selector } * */ public Selector createSelector() { return new Selector(); }
/** * Creates the complete report definition with all the dates and types properly set. * * @param reportDefinitionReportType the report type. * @param dateRangeAndType the date range and type. * @param reportDefinitionKey the key defining the report in the properties file. * @param properties the properties resource. * @return the {@code ReportDefinition} instance. */ protected ReportDefinition getReportDefinition( ReportDefinitionReportType reportDefinitionReportType, DateRangeAndType dateRangeAndType, String reportDefinitionKey, Properties properties) { // Create the Selector with all the fields defined in the Mapping Selector selector = new Selector(); List<String> reportFields = csvReportEntitiesMapping.retrievePropertiesToSelect(reportDefinitionReportType); // Add the inclusions from the properties file List<String> reportFieldsToInclude = getReportInclusions(reportDefinitionKey, properties); for (String reportField : reportFields) { if (reportFieldsToInclude.contains(reportField)) { selector.getFields().add(reportField); } } adjustDateRange(reportDefinitionReportType, dateRangeAndType, selector); return instantiateReportDefinition( reportDefinitionReportType, dateRangeAndType.getType(), selector); }
} else { ReportDefinition reportDefinition = new ReportDefinition(); reportDefinition.setSelector(new Selector()); reportDefinition .getSelector()