java – SUBMISSION IN CLAUSULA SELECT IN JPA ECLIPSELINK CRITERIA

I would like to know how I can pass this SQL query to JPA Criteria. The query works for me when I run it from the database manager.
I use Oracle as a database and EclipseLink version 2.6.3

SELECT m.nid_tm_material, m.txt_description, m.flg_section, m.flg_active,
(SELECT COUNT (*) FROM tm_material sub WHERE sub.nid_tm_material_product = m.nid_tm_material) elements
FROM tm_material m