Query: Usability of classes inside Internal package

Based on the primary analysis I found that in version 5.2 ValueHandlerFactory and entire criteria package was moved to org.hibernate.jpa.criteriaorg.hibernate.query.criteria.internal .
Commit: 774b805

For some of my internal work I needed some of ValueHandlerFactory static classes and add few of my customized valueHandler to convert my string to a specific type so that I don’t need to implement everything from scratch.

Question is when something is moved to a internal package does it means that is not recommend to use/extend it or there is some other way I can use org.hibernate.query.criteria.internal.ValueHandlerFactory and extend its functions?

You can use that, but it might change in any release, so we don’t recommend you to do that unless you are ok with adapting your code every once in a while.

1 Like