Package org.compiere.dbPort
Class SQLStatementRewriterProvider
java.lang.Object
org.compiere.dbPort.SQLStatementRewriterProvider
IDEMPIERE-7023
Static helper that aggregates all OSGi-registered
ISQLStatementRewriter
providers and chains their rewrites.
Registered as an immediate OSGi DS component; providers are injected via
@Reference (cardinality 0..n, dynamic policy). The static methods
delegate to the component instance so callers (Convert, DB_PostgreSQL,
DB_Oracle) need no OSGi awareness.
Re-entrancy prevention is the responsibility of each ISQLStatementRewriter
implementation: providers must not execute SQL through the iDempiere DB layer
inside rewriteStatements() — see that method's contract.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidvoidstatic booleanvoidstatic StringrewriteStatements(String sqlStatements) Iterates all registered providers and chains their rewrites.
-
Constructor Details
-
SQLStatementRewriterProvider
public SQLStatementRewriterProvider()
-
-
Method Details
-
activate
public void activate() -
deactivate
public void deactivate() -
addISQLStatementRewriter
-
removeISQLStatementRewriter
-
rewriteStatements
Iterates all registered providers and chains their rewrites. Returns the input unchanged when no provider is registered.- Parameters:
sqlStatements- input SQL- Returns:
- possibly rewritten SQL
-
isConvertCacheable
public static boolean isConvertCacheable()- Returns:
- true if EVERY registered rewriter declares its output cacheable, or if no provider is registered.
-