1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.bulkeditor;
|
11
|
|
12
|
import java.util.ArrayList;
|
13
|
import java.util.List;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
|
16
|
import eu.etaxonomy.cdm.api.service.config.IdentifiableServiceConfiguratorFactory;
|
17
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
18
|
import eu.etaxonomy.cdm.persistence.query.OrderHint;
|
19
|
|
20
|
/**
|
21
|
* @author n.hoffmann
|
22
|
* @created Dec 14, 2010
|
23
|
* @version 1.0
|
24
|
*/
|
25
|
public class BulkEditorQuery {
|
26
|
|
27
|
private final String searchString;
|
28
|
private final IIdentifiableEntityServiceConfigurator searchConfigurator;
|
29
|
|
30
|
public BulkEditorQuery (String searchString) {
|
31
|
this.searchString = searchString;
|
32
|
List<String> propertyPath = new ArrayList<String>();
|
33
|
propertyPath.add("markers");
|
34
|
searchConfigurator = IdentifiableServiceConfiguratorFactory.getConfigurator(IdentifiableEntity.class);
|
35
|
searchConfigurator.setTitleSearchString(searchString);
|
36
|
searchConfigurator.setMatchMode(null);
|
37
|
searchConfigurator.setOrderHints(OrderHint.ORDER_BY_TITLE_CACHE.asList());
|
38
|
searchConfigurator.setPropertyPaths(propertyPath);
|
39
|
searchConfigurator.setPageSize(20);
|
40
|
}
|
41
|
|
42
|
public String getSearchString() {
|
43
|
return searchString;
|
44
|
}
|
45
|
|
46
|
public IIdentifiableEntityServiceConfigurator getSearchConfigurator() {
|
47
|
return searchConfigurator;
|
48
|
}
|
49
|
}
|