public final class MultiWordKeywordTable extends Object
LEFT OUTER JOIN,
UNION ALL, GROUP BY).
The phrases are declared in /pp2/keywords.properties on the
classpath. org.json is not available to gsp_java_core, so a
line-based format is used instead of keywords.json (plan §5.5 and
forbidden action #8 — no new third-party dependency). Each rule line is:
<SCOPE>: <phrase> | <phrase> | ...where
SCOPE is ALL or an EDbVendor enum constant name
(e.g. dbvoracle). Blank lines and # comments are ignored.
The resource is parsed once per JVM into an immutable base model
(eager class-init). forVendor(EDbVendor) returns an immutable,
longest-phrase-first MultiWordKeywordTable.Phrase list, memoised per vendor via
ConcurrentHashMap.computeIfAbsent(K, java.util.function.Function<? super K, ? extends V>). getLoadCount() exposes how
many times the resource file itself was parsed (always 1 in a healthy JVM);
the S18 test asserts this.
Plan reference: §7.3/S18, §7.4/S18.
| Modifier and Type | Class and Description |
|---|---|
static class |
MultiWordKeywordTable.Phrase
An immutable multi-word keyword phrase: its lower-cased words (for
matching) and an upper-cased canonical rendering (for reporting/merging).
|
| Modifier and Type | Method and Description |
|---|---|
static List<MultiWordKeywordTable.Phrase> |
forVendor(EDbVendor vendor)
Return the immutable, longest-phrase-first list of multi-word keyword
phrases applicable to
vendor (the universal ALL phrases
plus any vendor-specific ones). |
static int |
getLoadCount()
Number of times the resource file was parsed (1 in a healthy JVM).
|
public static List<MultiWordKeywordTable.Phrase> forVendor(EDbVendor vendor)
vendor (the universal ALL phrases
plus any vendor-specific ones). Memoised per vendor.NullPointerException - if vendor is nullpublic static int getLoadCount()