Query By Proxy
A java criteria api where path expressions are composed by invoking methods on a proxy for a class.
State=BETA
Basic operation (JPA entry-point):
ProxyQueryFactory qbpfactory = JpaProxyQueries.createQueryFactory(entityManager); ProxyQuery<Customer> query = qbpfactory.createQuery(Customer.class); Customer customer = query.getRootProxy(); query.andWhere(customer.getFirstName()).equalTo("John"); List<Customer> results = query.find(); Assert.assertEquals( "SELECT a FROM Customer a WHERE a.firstName = 'John'", query.toString());
Basic operation (Hibernate entry-point):
ProxyQueryFactory qbpfactory = HibernateProxyQueries.createQueryFactory(session); ProxyQuery<Customer> query = qbpfactory.createQuery(Customer.class); Customer customer = query.getRootProxy(); query.andWhere(customer.getFirstName()).equalTo("John"); List<Customer> results = query.find(); Assert.assertEquals( "SELECT a FROM Customer a WHERE a.firstName = 'John'", query.toString());
Comments (3)
Jan 21, 2010
Anonymous says:
Recently I have downloaded an article on search on torrents http://www.picktorre...Recently I have downloaded an article on search on torrents http://www.picktorrent.com which explains the steps necessary to programmatically query and sets the proxy setting information for Internet Explorer. I understood a little, and still some facts embarrassed me. Now I want to find information about other browsers.
Aug 07
Anonymous says:
I like this website I feel that this site could be very useful . essay writing s...I like this website I feel that this site could be very useful .
essay writing service
Aug 15
Anonymous says:
I am very happy to discover your post as it will become number 1 in my collectio...I am very happy to discover your post as it will become number 1 in my collection of favorite wiki to visit.
dispute resolution Ukraine
Add Comment