Revision 2f02081c
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/service/CdmFilterablePagingProvider.java | ||
---|---|---|
19 | 19 |
import eu.etaxonomy.cdm.model.common.IdentifiableEntity; |
20 | 20 |
import eu.etaxonomy.cdm.persistence.query.MatchMode; |
21 | 21 |
import eu.etaxonomy.cdm.persistence.query.OrderHint; |
22 |
import eu.etaxonomy.cdm.vaadin.session.ConversationDirector; |
|
23 | 22 |
|
24 | 23 |
/** |
25 | 24 |
* @author a.kohlbecker |
... | ... | |
36 | 35 |
|
37 | 36 |
private List<OrderHint> orderHints = OrderHint.ORDER_BY_TITLE_CACHE.asList(); |
38 | 37 |
|
39 |
private ConversationDirector conversationDirector; |
|
40 |
|
|
41 | 38 |
|
42 | 39 |
/** |
43 | 40 |
* @return the matchMode |
... | ... | |
72 | 69 |
* |
73 | 70 |
* @param service |
74 | 71 |
*/ |
75 |
public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service, ConversationDirector conversationDirector) {
|
|
72 |
public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service) { |
|
76 | 73 |
super(); |
77 | 74 |
this.service = service; |
78 |
this.conversationDirector = conversationDirector; |
|
79 | 75 |
} |
80 | 76 |
|
81 | 77 |
/** |
... | ... | |
83 | 79 |
* @param matchMode |
84 | 80 |
* @param orderHints |
85 | 81 |
*/ |
86 |
public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service, MatchMode matchMode, List<OrderHint> orderHints, ConversationDirector conversationDirector) {
|
|
82 |
public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service, MatchMode matchMode, List<OrderHint> orderHints) { |
|
87 | 83 |
super(); |
88 | 84 |
this.service = service; |
89 | 85 |
this.matchMode = matchMode; |
90 | 86 |
this.orderHints = orderHints; |
91 |
this.conversationDirector = conversationDirector; |
|
92 | 87 |
} |
93 | 88 |
|
94 | 89 |
/** |
... | ... | |
97 | 92 |
@Override |
98 | 93 |
public List<T> findEntities(int firstRow, String filter) { |
99 | 94 |
|
100 |
conversationDirector.ensureBoundConversation(); |
|
101 | 95 |
Pager<T> page = service.findByTitle( |
102 | 96 |
null, |
103 | 97 |
filter, |
... | ... | |
117 | 111 |
@Override |
118 | 112 |
public int size(String filter) { |
119 | 113 |
|
120 |
conversationDirector.ensureBoundConversation(); |
|
121 | 114 |
Pager<T> page = service.findByTitle( |
122 | 115 |
null, |
123 | 116 |
filter, |
Also available in: Unified diff
ref #7046 completely removing open session per view implementation and adding init strategies for Name and Typedesignation editor