Class BroadleafDialectEnhancer.DialectInterceptor
java.lang.Object
com.broadleafcommerce.common.jpa.data.dialect.BroadleafDialectEnhancer.DialectInterceptor
- Enclosing class:
- BroadleafDialectEnhancer
Inner interceptor class used by ByteBuddy to delegate method calls.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.hibernate.sql.ast.SqlAstTranslatorFactorygetSqlAstTranslatorFactory(Callable<org.hibernate.sql.ast.SqlAstTranslatorFactory> superCall) Intercepts the invocation ofgetSqlAstTranslatorFactory()on the dynamically generated subclass.
-
Constructor Details
-
DialectInterceptor
public DialectInterceptor()
-
-
Method Details
-
getSqlAstTranslatorFactory
@RuntimeType public static org.hibernate.sql.ast.SqlAstTranslatorFactory getSqlAstTranslatorFactory(@SuperCall Callable<org.hibernate.sql.ast.SqlAstTranslatorFactory> superCall) throws Exception Intercepts the invocation ofgetSqlAstTranslatorFactory()on the dynamically generated subclass. Instead of returning the standard dialect factory, this returns a new instance ofBroadleafSqlAstTranslatorFactory.- Parameters:
superCall- the original super-method invocation reference (not executed here as we completely bypass it)- Returns:
- a
BroadleafSqlAstTranslatorFactoryinstance - Throws:
Exception- if an error occurs during interception
-