Raoua KHATERCHI created CXF-9174:
------------------------------------
Summary: Allow overriding buildPredicate in
JPACriteriaQueryVisitor for custom predicates
Key: CXF-9174
URL: https://issues.apache.org/jira/browse/CXF-9174
Project: CXF
Issue Type: Task
Components: JAX-RS
Environment: * Apache CXF 4.0.4
* {{cxf-rt-rs-extension-search}}
* Jakarta Persistence ({{{}jakarta.persistence{}}})
Reporter: Raoua KHATERCHI
Fix For: 4.1.1
I am using Apache CXF 4.0.4 with {{cxf-rt-rs-extension-search}} for building
JPA Criteria queries via {{{}JPACriteriaQueryVisitor{}}}. Currently, the class
{*}does not allow overriding or extending the {{buildPredicate}} logic{*},
because:
# The method {{buildPredicate(PrimitiveStatement ps)}} in
{{AbstractJPATypedQueryVisitor}} is {*}private{*}, making it impossible to
customize predicate generation.
# There is no protected or public extension point to apply custom
transformations, such as accent-insensitive search, normalization of fields, or
other domain-specific predicate logic.
This limitation prevents extending CXF's FIQL/JPA Criteria integration for
advanced use cases like accent-insensitive filtering in a way that works across
Oracle and PostgreSQL.
*Expected behavior:*
Provide either:
* {{buildPredicate}} or similar method as *protected* in
{{AbstractJPATypedQueryVisitor}} so it can be overridden, or
* A clear extension point in {{JPACriteriaQueryVisitor}} to allow
customization of predicate generation without copying the entire class.
This will allow developers to implement custom filtering logic (e.g.,
unaccented search, normalization) in a maintainable way without modifying CXF
core classes.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)