Hi Raoua,
Replied you on the JIRA issue, for visibility also sharing it here. The
AbstractJPATypedQueryVisitor was designed to be extendable, I believe it
would make sense to open up (== protected) doBuildXxx methods so the
predicate construction could be customized. Thank you.
Best Regards,
Andriy Redko
On Tue, Nov 11, 2025, 4:45 a.m. Raoua KHATERCHI <[email protected]>
wrote:
> Hi everyone,
>
> I recently opened a Jira issue regarding the extensibility of the JPA FIQL
> visitor classes, specifically JPACriteriaQueryVisitor and
> AbstractJPATypedQueryVisitor.
>
> *Issue link:*
> https://issues.apache.org/jira/browse/CXF-9174
>
> My goal is to make it easier to customize predicate generation (for
> example,
> accent-insensitive / locale-aware string comparisons) without having to
> duplicate the entire visitor class.
>
> Currently, most of the predicate construction logic is private. One
> possible
> solution would be to make buildPredicate(PrimitiveStatement) and/or the
> lower-level predicate creation methods protected, or to introduce a
> protected
> extension hook that allows overriding comparison behavior.
>
> Before starting a PR, I would like to ask:
>
> -
>
> Is there already an existing extension mechanism or recommended pattern
> for customizing predicate generation?
> -
>
> If not, would introducing a protected hook or modifying the visibility
> of
> these methods be an acceptable approach?
>
> I would be happy to contribute a PR once we align on the preferred design
> direction.
>
> Thanks in advance,
> *Raoua*
>