3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.bulkeditor
;
13 import java
.util
.ArrayList
;
14 import java
.util
.Comparator
;
15 import java
.util
.List
;
17 import eu
.etaxonomy
.cdm
.api
.service
.config
.IIdentifiableEntityServiceConfigurator
;
18 import eu
.etaxonomy
.cdm
.api
.service
.config
.IdentifiableServiceConfiguratorFactory
;
19 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
23 * @created Dec 14, 2010
26 public class BulkEditorQuery
{
28 private String searchString
;
29 private Comparator
<?
> comparator
;
30 private IIdentifiableEntityServiceConfigurator searchConfigurator
;
32 public BulkEditorQuery (String searchString
, Comparator comparator
) {
33 this.searchString
= searchString
;
34 this.comparator
= comparator
;
35 List
<String
> propertyPath
= new ArrayList
<String
>();
36 propertyPath
.add("markers");
37 searchConfigurator
= IdentifiableServiceConfiguratorFactory
.getConfigurator(IdentifiableEntity
.class);
38 searchConfigurator
.setTitleSearchString(searchString
);
39 searchConfigurator
.setMatchMode(null);
40 searchConfigurator
.setPropertyPaths(propertyPath
);
42 if(searchString
!= null && searchString
.trim().equals("*")){
43 searchConfigurator
.setPageSize(1000);
49 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getComparator()
51 public Comparator
getComparator() {
56 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getSearchString()
58 public String
getSearchString() {
63 * @see eu.etaxonomy.taxeditor.bulkeditor.IBulkEditorQuery#getSearchConfigurator()
65 public IIdentifiableEntityServiceConfigurator
getSearchConfigurator() {
66 return searchConfigurator
;