Project

General

Profile

« Previous | Next » 

Revision 73d25c5b

Added by Patrick Plitzner almost 6 years ago

ref #7439 Fix loading progress of occurrence bulk editor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java
135 135
	 * @param configurator the configurator to use for the search
136 136
	 * @return a list of the SpecimenOrObservationBases matching the search parameters found
137 137
	 */
138
	public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator configurator){
138
	public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator configurator, boolean showCountWarning){
139 139
	    // by default we do not show field units. This may be configured via preferences
140
	    return findOccurrences(configurator, PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS));
140
	    return findOccurrences(configurator, PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS), showCountWarning);
141 141
	}
142 142

  
143 143

  
......
150 150
	 * @param showFieldUnits if <code>true</code> then also FieldUnits are searched
151 151
	 * @return
152 152
	 */
153
	public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> configurator, boolean showFieldUnits){
153
	public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator<SpecimenOrObservationBase> configurator, boolean showFieldUnits,
154
	        boolean showCountWarning){
154 155
	    List<SpecimenOrObservationBase> records = new ArrayList<SpecimenOrObservationBase>();
155 156
		final List<String> BASE_OCCURRENCE_INIT_STRATEGY = Arrays.asList(new String[] {
156 157
		        "collection", //$NON-NLS-1$
......
175 176
		}
176 177
		configurator.setPropertyPaths(occurrencePropertyPaths);
177 178

  
178
        if(checkLargeResult(CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator))){
179
        if(showCountWarning && checkLargeResult(CdmStore.getService(IOccurrenceService.class).countOccurrences(configurator))){
180
            records = CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords();
181
        }
182
        else{
179 183
            records = CdmStore.getService(IOccurrenceService.class).findByTitle(configurator).getRecords();
180 184
        }
181 185
		addUuidSearchResults(records, configurator, IOccurrenceService.class);

Also available in: Unified diff