Revision bf7d1e0b
Added by Andreas Müller almost 8 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/pager/impl/DefaultPagerImpl.java | ||
---|---|---|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2009 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
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. |
|
9 |
*/ |
|
10 |
|
|
11 |
package eu.etaxonomy.cdm.api.service.pager.impl; |
|
12 |
|
|
13 |
import java.util.List; |
|
14 |
|
|
15 |
public class DefaultPagerImpl<T> extends AbstractPagerImpl<T> { |
|
16 |
|
|
17 |
private static final long serialVersionUID = 1L; |
|
18 |
|
|
19 |
/** |
|
20 |
* Constructor |
|
21 |
* |
|
22 |
* @param currentIndex the page of this result set (0-based), can be null |
|
23 |
* @param count the total number of results available for this query |
|
24 |
* @param pageSize The size of pages (can be null or 0 if all results should be returned if available) |
|
25 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
26 |
* |
|
27 |
* @deprecated This constructor only supports total result counts to {@link Integer#MAX_VALUE} u |
|
28 |
* use {@link DefaultPagerImpl(Integer currentIndex, Long count, Integer pageSize, List<T> records, String suggestion)} |
|
29 |
* instead |
|
30 |
*/ |
|
31 |
@Deprecated |
|
32 |
public DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records) { |
|
33 |
super(currentIndex, count, pageSize, records); |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* Constructor |
|
38 |
* |
|
39 |
* @param currentIndex the page of this result set (0-based), can be null |
|
40 |
* @param count the total number of results available for this query |
|
41 |
* @param pageSize The size of pages (can be null or 0 if all results should be returned if available) |
|
42 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
43 |
*/ |
|
44 |
public DefaultPagerImpl(Integer currentIndex, Long count, Integer pageSize, List<T> records) { |
|
45 |
super(currentIndex, count, pageSize, records); |
|
46 |
} |
|
47 |
|
|
48 |
/** |
|
49 |
* Constructor |
|
50 |
* |
|
51 |
* @param currentIndex the page of this result set (0-based), can be null |
|
52 |
* @param count the total number of results available for this query |
|
53 |
* @param pageSize The size of pages (can be null if all results should be returned if available) |
|
54 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
55 |
* @param suggestion a suggested query that would improve the search (only applicable for free-text / lucene queries) |
|
56 |
* |
|
57 |
* @deprecated This constructor only supports total result counts to {@link Integer#MAX_VALUE} u |
|
58 |
* use {@link DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records, String suggestion)} |
|
59 |
* instead |
|
60 |
*/ |
|
61 |
@Deprecated |
|
62 |
public DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records, String suggestion) { |
|
63 |
super(currentIndex, count, pageSize, records,suggestion); |
|
64 |
} |
|
65 |
|
|
66 |
/* (non-Javadoc) |
|
67 |
* @see eu.etaxonomy.cdm.api.service.pager.impl.AbstractPagerImpl#createLabel(java.lang.String, java.lang.String) |
|
68 |
*/ |
|
69 |
@Override |
|
70 |
protected String createLabel(String s1, String s2) { |
|
71 |
return s1 + DefaultPagerImpl.LABEL_DIVIDER + s2; |
|
72 |
} |
|
73 |
} |
|
1 |
// $Id$ |
|
2 |
/** |
|
3 |
* Copyright (C) 2009 EDIT |
|
4 |
* European Distributed Institute of Taxonomy |
|
5 |
* http://www.e-taxonomy.eu |
|
6 |
* |
|
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. |
|
9 |
*/ |
|
10 |
|
|
11 |
package eu.etaxonomy.cdm.api.service.pager.impl; |
|
12 |
|
|
13 |
import java.util.List; |
|
14 |
|
|
15 |
public class DefaultPagerImpl<T> extends AbstractPagerImpl<T> { |
|
16 |
|
|
17 |
private static final long serialVersionUID = 1L; |
|
18 |
|
|
19 |
/** |
|
20 |
* Constructor |
|
21 |
* |
|
22 |
* @param currentIndex the page of this result set (0-based), can be null |
|
23 |
* @param count the total number of results available for this query |
|
24 |
* @param pageSize The size of pages (can be null or 0 if all results should be returned if available) |
|
25 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
26 |
* |
|
27 |
* @deprecated This constructor only supports total result counts to {@link Integer#MAX_VALUE} u |
|
28 |
* use {@link DefaultPagerImpl(Integer currentIndex, Long count, Integer pageSize, List<T> records, String suggestion)} |
|
29 |
* instead |
|
30 |
*/ |
|
31 |
@Deprecated |
|
32 |
public DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records) { |
|
33 |
super(currentIndex, count, pageSize, records); |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* Constructor |
|
38 |
* |
|
39 |
* @param currentIndex the page of this result set (0-based), can be null |
|
40 |
* @param count the total number of results available for this query |
|
41 |
* @param pageSize The size of pages (can be null or 0 if all results should be returned if available) |
|
42 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
43 |
*/ |
|
44 |
public DefaultPagerImpl(Integer currentIndex, Long count, Integer pageSize, List<T> records) { |
|
45 |
super(currentIndex, count, pageSize, records); |
|
46 |
} |
|
47 |
|
|
48 |
/** |
|
49 |
* Constructor |
|
50 |
* |
|
51 |
* @param currentIndex the page of this result set (0-based), can be null |
|
52 |
* @param count the total number of results available for this query |
|
53 |
* @param pageSize The size of pages (can be null if all results should be returned if available) |
|
54 |
* @param records A list of objects in this page (can be empty if there were no results) |
|
55 |
* @param suggestion a suggested query that would improve the search (only applicable for free-text / lucene queries) |
|
56 |
* |
|
57 |
* @deprecated This constructor only supports total result counts to {@link Integer#MAX_VALUE} u |
|
58 |
* use {@link DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records, String suggestion)} |
|
59 |
* instead |
|
60 |
*/ |
|
61 |
@Deprecated |
|
62 |
public DefaultPagerImpl(Integer currentIndex, Integer count, Integer pageSize, List<T> records, String suggestion) { |
|
63 |
super(currentIndex, count, pageSize, records,suggestion); |
|
64 |
} |
|
65 |
|
|
66 |
@Override |
|
67 |
protected String createLabel(String s1, String s2) { |
|
68 |
return s1 + DefaultPagerImpl.LABEL_DIVIDER + s2; |
|
69 |
} |
|
70 |
} |
Also available in: Unified diff
Clean up AnnotationDao and AnnotationService