Project

General

Profile

task #7527

CdmEntityDaoBase.*ByParam() public and also available in the service layer

Added by Andreas Kohlbecker 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Highest
Category:
cdmlib
Target version:
Start date:
06/29/2018
Due date:
% Done:

100%

Severity:
normal

Description

The methods

  • CdmEntityDaoBase.countBy(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions)
  • CdmEntityDaoBase.protected List<T> findByParam(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths)

should be made public and would be valuable in the service layer, potentially also in the webservice controllers.


Related issues

Related to Edit - bug #7523: RegistrationWorkingSetEditor: existing name combobox must only offer names which are not yet registered in phycobank Rejected 06/28/2018
Related to Edit - bug #7525: IdentifiableServiceBase findByTitle(), and listByTitle() methods support cdm Restrictions and Criteria Closed 06/28/2018

Associated revisions

Revision 13ec97db (diff)
Added by Andreas Kohlbecker 6 months ago

ref #7527 renaming CdmEntityDaoBase.ByParam methods

Revision 51ee66dc (diff)
Added by Andreas Kohlbecker 5 months ago

fix #7527 making page by parameter with criteria and restrictions available in the service layer

Revision d2e6ea3e (diff)
Added by Andreas Kohlbecker 5 months ago

ref #7527 adding missing @Transactional to new service methods

History

#1 Updated by Andreas Kohlbecker 6 months ago

  • Related to bug #7523: RegistrationWorkingSetEditor: existing name combobox must only offer names which are not yet registered in phycobank added

#2 Updated by Andreas Kohlbecker 6 months ago

  • Related to bug #7525: IdentifiableServiceBase findByTitle(), and listByTitle() methods support cdm Restrictions and Criteria added

#3 Updated by Andreas Kohlbecker 6 months ago

  • Subject changed from CdmEntityDaoBase.*ByParamWithRestrictions() public and also available in the service layer to CdmEntityDaoBase.*ByParam() public and also available in the service layer
  • Description updated (diff)

I renamed the methods so that the more general an versatile methods have the shorter name.

#4 Updated by Andreas Kohlbecker 6 months ago

  • Status changed from New to Feedback
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • Priority changed from New to Highest
  • % Done changed from 0 to 10

Hi Andreas,

what do you think about exposing these methods to the public?

Andreas

#5 Updated by Andreas Kohlbecker 5 months ago

  • Status changed from Feedback to In Progress
  • % Done changed from 10 to 50

I implemented public Pager<T> pageByRestrictions(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Restriction<?>> restrictions, Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths); for ServiceBase ...

#6 Updated by Andreas Kohlbecker 5 months ago

... also public Pager<T> page(Class<? extends T> clazz, String param, String queryString, MatchMode matchmode, List<Criterion> criteria, Integer pageSize, Integer pageIndex, List<OrderHint> orderHints, List<String> propertyPaths); ...

#7 Updated by Andreas Kohlbecker 5 months ago

  • Status changed from In Progress to Resolved

#8 Updated by Andreas Kohlbecker 5 months ago

please review.

#9 Updated by Andreas Müller 4 months ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 50 to 100

Generally this looks ok. Only the return types should be specified explicitly. I created a new ticket as this is a general issue: #7664 and implemented it in Revision cdmlib|98ce4a92

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)