Skip to main content
Jump to: navigation, search

Scout/Concepts/Sql Lookup Service

< Scout‎ | Concepts
Revision as of 18:35, 21 March 2011 by Dev.jmini.fr (Talk | contribs) (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|...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Scout
Wiki Home
Website
DownloadGit
Community
ForumsBlogTwitterG+
Bugzilla
Bugzilla


A SQL lookup Service is a specific type of Lookup Service that works with a database.

  • implements: I obj.pngILookupService
  • extends: C obj.pngAbstractSqlLookupService


Description

A SQL lookup Service provide a way to implement a Lookup Service that is very efficient to configured, if the call is resolved with a database.

Instead of implementing the 4 methods (getDataByKey(LookupCall call), getDataByText(LookupCall call), getDataByAll(LookupCall call), getDataByRec(LookupCall call)), it is possible to defined the behavior of the lookup service with some configuration properties and events.


Properties

Defined with getConfiguredXxxxxx() methods.

SqlSelect

Note.png
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 getDataByKey(LookupCall call) is attachted to the query as binding. Therefore all getter on the call, are available in the query.

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>


SortColumn

Note.png
TODO
TODO: SortColumn


Events

Defined with execXxxxxx() methods.

Template:ScoutEvt

Note.png
TODO
TODO: LoadLookupRows


See Also

Back to the top