Convert a traditional query into Java Persistent Criteria Query
$2-5 USD / hour
Cancelled
Posted almost 9 years ago
$2-5 USD / hour
Dear all Java backend experts,
Could you please help me convert the following traditional sql statement into Criteria Query in Java?:
Query q = [login to view URL]("select [login to view URL] as root_name "
+ " , [login to view URL] as down1_name "
+ " , [login to view URL] as down2_name "
+ " , [login to view URL] as down3_name "
+ " from categories as root "
+ "left outer join categories as down1 on [login to view URL] = [login to view URL] "
+ "left outer join categories as down2 on [login to view URL] = [login to view URL] "
+ "left outer join categories as down3 on [login to view URL] = [login to view URL] "
+ " where [login to view URL] is null "
+ "order "
+ " by root_name "
+ " , down1_name "
+ " , down2_name "
+ " , down3_name ");
Very appreciate for any suggestion and help.
Sam
Hi,
The Java Persistence Criteria API is no so complicated, and I can do it.
I believe that you know that if you want to use JPA, you will need to have a Database Bean for the "categories" table and a JPA Controller where this Criteria Query will be placed into.
This query is used for displaying all categories and sub-categories, usually used for a site map. Am I right?
Kind regards,
Tudor
we have been working on ORM framework hibernate for last three year so we have good exposure on criteria queries etc. Please give us the opportunity to work on this project, we will assure you quality work with in time.