Class BroadleafSqlAstTranslatorFactory
java.lang.Object
org.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory
com.broadleafcommerce.common.jpa.data.dialect.BroadleafSqlAstTranslatorFactory
- All Implemented Interfaces:
org.hibernate.sql.ast.SqlAstTranslatorFactory
public class BroadleafSqlAstTranslatorFactory
extends org.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory
A custom
SqlAstTranslatorFactory that extends Hibernate's standard
implementation to intercept and customize SQL AST generation.
This factory wraps an existing SqlAstTranslatorFactory (the delegate) and uses ByteBuddy
to dynamically subclass the generated SqlAstTranslator at runtime to override
visitBooleanExpressionPredicate. This ensures that the underlying dialect-specific
translator logic is preserved (e.g., PostgreSQLSqlAstTranslator) while still allowing
BooleanExpressionPredicateHelper to safely inspect and rewrite boolean expression
predicates prior to standard translation.
- See Also:
-
StandardSqlAstTranslatorFactorySqlAstTranslator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionBroadleafSqlAstTranslatorFactory(org.hibernate.sql.ast.SqlAstTranslatorFactory delegate) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends org.hibernate.sql.exec.spi.JdbcOperation>
org.hibernate.sql.ast.SqlAstTranslator<T>buildTranslator(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.sql.ast.tree.Statement statement) Methods inherited from class org.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory
buildModelMutationTranslator, buildMutationTranslator, buildSelectTranslator
-
Constructor Details
-
BroadleafSqlAstTranslatorFactory
public BroadleafSqlAstTranslatorFactory() -
BroadleafSqlAstTranslatorFactory
public BroadleafSqlAstTranslatorFactory(org.hibernate.sql.ast.SqlAstTranslatorFactory delegate)
-
-
Method Details
-
buildTranslator
protected <T extends org.hibernate.sql.exec.spi.JdbcOperation> org.hibernate.sql.ast.SqlAstTranslator<T> buildTranslator(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory, org.hibernate.sql.ast.tree.Statement statement) - Overrides:
buildTranslatorin classorg.hibernate.sql.ast.spi.StandardSqlAstTranslatorFactory
-