Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Sql Lookup Service"

(New page: {{ScoutPage|cat=Concepts}} A '''SQL lookup Service''' is a specific type of {{ScoutLink|Concepts|Lookup_Service|Lookup Service}} that works with a database. * implements: {{ScoutJavadoc|...)
 
(Replaced content with "The Scout documentation has been moved to https://eclipsescout.github.io/.")
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{ScoutPage|cat=Concepts}}
+
The Scout documentation has been moved to https://eclipsescout.github.io/.
 
+
A '''SQL lookup Service''' is a specific type of {{ScoutLink|Concepts|Lookup_Service|Lookup Service}} that works with a database.
+
 
+
* implements: {{ScoutJavadoc|ILookupService|I}}
+
* extends: {{ScoutJavadoc|AbstractSqlLookupService|C}}
+
 
+
 
+
== Description ==
+
A '''SQL lookup Service''' provide a way to implement a {{ScoutLink|Concepts|Lookup_Service|Lookup Service}} that is very efficient to configured, if the {{ScoutLink|Concepts|LookupCall|call}} is resolved with a database.
+
 
+
Instead of implementing the 4 methods (<code>getDataByKey(LookupCall call)</code>, <code>getDataByText(LookupCall call)</code>, <code>getDataByAll(LookupCall call)</code>, <code>getDataByRec(LookupCall call)</code>), it is possible to defined the behavior of the lookup service with some configuration properties and events.
+
 
+
 
+
== Properties ==
+
''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
+
 
+
{{ScoutProp|SqlSelect}}
+
 
+
{{note|TODO|SqlSelect: what should be the result}}
+
 
+
Possibility to use some special tags:
+
* key
+
* text
+
* all
+
* rec
+
 
+
Depending on the function that is called (by key, by text, by all, by rec) only the portion of the SQL query beetween the corresponding tag is keept.
+
 
+
The <code>getDataByKey(LookupCall call)</code> is attachted to the query as binding. Therefore all getter on the call, are available in the query.
+
 
+
<source lang="sql">
+
select language_id, name, null, null, null, null, null, 1, null, 1 from language " +
+
<key>where language_id = :key</key>
+
<text>where upper(name) like upper('%'||:text||'%')</text>
+
</source>
+
 
+
 
+
{{ScoutProp|SortColumn}}
+
 
+
{{note|TODO|TODO: SortColumn}}
+
 
+
 
+
== Events ==
+
''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
+
 
+
{{ScoutEvt|LoadLookupRows}}
+
 
+
{{note|TODO|TODO: LoadLookupRows}}
+
 
+
 
+
== See Also ==
+
* {{ScoutLink|Concepts|Lookup_Service|LookupService}}
+
* {{ScoutLink|Concepts|LookupCall|LookupCall}}
+
* {{ScoutLink|Concepts|LookupRow|LookupRow}}
+
* {{ScoutLink|Concepts|Server Plug-In|Server Plug-In}}
+

Latest revision as of 05:15, 14 March 2024

The Scout documentation has been moved to https://eclipsescout.github.io/.

Back to the top