With HQL I can enter the following statement can be made :
SELECT new MyClass(u.name,u.email) FROM User u ;
where MyClass is a normal Javabean with name and email as a Constructor.
I like to use Hibernate Criteria to construct such queries. Is this possible. I know I can restrict the columns to name and email using Projections but how do I get to use the new operator in Criteria ?