Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369024 - Correction LocalLookupCall and addition of a LocalLookupService
Summary: Correction LocalLookupCall and addition of a LocalLookupService
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Stephan Leicht Vogt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 00:40 EST by Jeremie Bresson CLA
Modified: 2021-08-19 11:29 EDT (History)
2 users (show)

See Also:
ivan.motsch: juno+


Attachments
Unit Test for LocalLookupCall (3.93 KB, application/octet-stream)
2012-01-19 00:42 EST, Jeremie Bresson CLA
ivan.motsch: iplog+
Details
Patch for bug 369024 (9.99 KB, patch)
2012-01-19 00:44 EST, Jeremie Bresson CLA
no flags Details | Diff
Unit Test for LocalLookupService (3.95 KB, application/octet-stream)
2012-01-19 00:47 EST, Jeremie Bresson CLA
no flags Details
Patch for bug 369024 (v2) (10.98 KB, patch)
2012-01-19 12:30 EST, Jeremie Bresson CLA
ivan.motsch: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremie Bresson CLA 2012-01-19 00:40:03 EST
Build Identifier: 

LocalLookupCall#getDataByRec() is not implemented in Local LookupCall: for the moment this function only provide an empty array of LookupRows.

A LocalLookupService would be useful in the cases where you need to compute the list of rows using an external system (not a database)

Reproducible: Always
Comment 1 Jeremie Bresson CLA 2012-01-19 00:42:49 EST
Created attachment 209720 [details]
Unit Test for LocalLookupCall

Unit test cases for LocalLookupCall. 
To be run as normal Unit Test.
Comment 2 Jeremie Bresson CLA 2012-01-19 00:44:50 EST
Created attachment 209721 [details]
Patch for bug 369024

A patch for the two problems:
* Addition of the LocalLookupService (analog to the LocalLookupCall).
* Delegation of the filtering operations of rows to a Helper class.
* Implementation of  getDataByRec considering parent key (given by LookupCall#getRec())
Comment 3 Jeremie Bresson CLA 2012-01-19 00:47:17 EST
Created attachment 209722 [details]
Unit Test for LocalLookupService

Transposition of the unit test cases for LocalLookupService.
To be run as normal Unit Tests in the server.
Comment 4 Jeremie Bresson CLA 2012-01-19 08:17:55 EST
Move of createLowerCaseSearchPattern(..) in StringUtility is missing in the patch.
Comment 5 Jeremie Bresson CLA 2012-01-19 12:30:34 EST
Created attachment 209765 [details]
Patch for bug 369024 (v2)

Add missing StringUtility modification.
Comment 6 Ivan Motsch CLA 2012-05-03 10:17:13 EDT
The LocalLookupCall is designed for those cases that are not delegating to a service. Therefore I would introduce a service to handle local lookup calls.

Also LocalLookupCall instances are expected to be "fast" and local for quick handling. Therefore when having large and "slow" lookup calls one would use a normal LookupCall subclass.

Regarding customization of create search pattern i will use your patch as it makes sense to not having static code at that place. It will be a moved to a protected location using the StringUtility as proposed by you.

Regarding the method getDataByRec: That method is empty since a LocalLookupCall is due to its nature never loading incrementally and thus also hierarchical forms of that LookupCall are fetching the complete tree at once.
See the SmartField with hierarchical lookup call for more details. It is fetching all data by calling getDataByAll and never calls getDataByRec on LocalLookupCalls.

I will apply the parts of the patch.
Comment 7 Ivan Motsch CLA 2012-05-03 10:35:31 EDT
added LocalLookupCall#createSearchPattern(String)
added StringUtility#toRegEx(String, int)
implemented LocalLookupCall#getDataByRec
added scout james junit test LocalLookupCallTest
Comment 8 Matthias Zimmermann CLA 2012-07-09 06:50:55 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)