public abstract class MEXTransformerEvaluator extends java.lang.Object implements MEXTransformerEvaluatorI
MEXTransformerEvaluators are plugged into a MEXTransformer to handle
specific custom tags or domain-specific language (DSL) extensions within a
query string. They follow a "detect-and-replace" pattern to transform
high-level metadata instructions into concrete database constraints.
canHandle(CharSequence).evaluate(CharSequence, MEXTransformer) is invoked.{Fulltext ...}) is replaced by the string returned by the evaluator.Implementations typically use Regular Expressions for parsing.
| Constructor and Description |
|---|
MEXTransformerEvaluator(MEXPersistenceQueryResults _mexQR)
Constructor for the evaluator.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canHandle(java.lang.CharSequence s)
Checks if the provided text segment matches the specific tag format
handled by this implementation.
|
abstract java.lang.CharSequence |
evaluate(java.lang.CharSequence s,
MEXTransformer transformer)
Performs the actual transformation of the MEX expression.
|
public MEXTransformerEvaluator(MEXPersistenceQueryResults _mexQR)
_mexQR - The runtime context required for lookups and service access.public abstract boolean canHandle(java.lang.CharSequence s)
Performance Note: This should be a lightweight check, ideally using
Matcher.lookingAt() to avoid unnecessary full-string scans.
_s - The segment of the query wrapped in braces (e.g. "Fulltext matches ...").public abstract java.lang.CharSequence evaluate(java.lang.CharSequence s,
MEXTransformer transformer)
This method is responsible for:
mexQR for external data if required.MEXParseException or MEXUnavailableException.evaluate in interface MEXTransformerEvaluatorIs - The raw expression string extracted from the query.transformer - The parent transformer, useful for determining the "source" entity
or accessing the original query context.MEXException - if syntax is invalid or required services are unavailable.Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.