|
|
(7 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 attached to the query as binding. Therefore all getters 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''.
| + | |
− | | + | |
− | {{ScoutEvent|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}}
| + | |