Add parameter to set max specimen count before warning
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 3 Feb 2016 06:48:55 +0000 (07:48 +0100)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 3 Feb 2016 13:35:22 +0000 (14:35 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java

index 395550a7bbad3761097df09ae417939bae6dba74..40a76e016d763c03cd31ff0cd31d5b5c546924d4 100644 (file)
@@ -209,7 +209,11 @@ public class SearchManager {
 
 
        private boolean checkLargeResult(int count) {
 
 
        private boolean checkLargeResult(int count) {
-               if(count > MAX_RESULTS_BEFORE_WARNING){
+           return checkLargeResult(count, MAX_RESULTS_BEFORE_WARNING);
+       }
+
+       private boolean checkLargeResult(int count, int maxBeforWarning) {
+               if(count > maxBeforWarning){
                        return MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Large result expected",
                                        String.format("The current search will return %s objects. This will " +
                                                        "take a long time and/or might render the editor unusable. Please consider refining your search.", count));
                        return MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Large result expected",
                                        String.format("The current search will return %s objects. This will " +
                                                        "take a long time and/or might render the editor unusable. Please consider refining your search.", count));