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
.cdm
.api
.service
.config
;
13 import java
.util
.List
;
15 import org
.hibernate
.criterion
.Criterion
;
17 import eu
.etaxonomy
.cdm
.model
.common
.IIdentifiableEntity
;
18 import eu
.etaxonomy
.cdm
.persistence
.query
.MatchMode
;
19 import eu
.etaxonomy
.cdm
.persistence
.query
.OrderHint
;
22 * @author a.babadshanjan
27 public class IdentifiableServiceConfiguratorImpl
<T
extends IIdentifiableEntity
> implements IIdentifiableEntityServiceConfigurator
<T
>{
29 private String titleSearchString
;
30 protected MatchMode matchMode
;
31 private Integer pageSize
;
32 private Integer pageNumber
;
33 private Class
<?
extends T
> clazz
;
34 private List
<Criterion
> criteria
;
35 private List
<String
> propertyPaths
;
36 private List
<OrderHint
> orderHints
;
39 public Class
<?
extends T
> getClazz() {
44 public void setClazz(Class
<?
extends T
> clazz
) {
48 public String
getTitleSearchString() {
49 return titleSearchString
;
52 public String
getTitleSearchStringSqlized(){
53 return getTitleSearchString().replace("*", "%");
56 public void setTitleSearchString(String titleSearchString
) {
57 this.titleSearchString
= titleSearchString
;
61 * @return the pageSize
63 public Integer
getPageSize() {
68 * Sets the number of results that should be shown on current page
70 * @param pageSize the pageSize to set
72 public void setPageSize(Integer pageSize
) {
73 this.pageSize
= pageSize
;
77 * @return the pageNumber
79 public Integer
getPageNumber() {
84 * Sets the number of the page the first result should come from, starting
85 * with 0 as the first page.
87 * @param pageNumber the pageNumber to set
89 public void setPageNumber(Integer pageNumber
) {
90 this.pageNumber
= pageNumber
;
93 public MatchMode
getMatchMode() {
97 public void setMatchMode(MatchMode matchMode
) {
98 this.matchMode
= matchMode
;
102 public List
<Criterion
> getCriteria() {
107 public void setCriteria(List
<Criterion
> criteria
) {
108 this.criteria
= criteria
;
112 public List
<OrderHint
> getOrderHints() {
117 public void setOrderHints(List
<OrderHint
> orderHints
) {
118 this.orderHints
= orderHints
;
122 public List
<String
> getPropertyPaths() {
123 return propertyPaths
;
127 public void setPropertyPaths(List
<String
> propertyPaths
) {
128 this.propertyPaths
= propertyPaths
;