[seam-issues] [JBoss JIRA] Created: (SEAMPERSIST-63) Query Interface

Frank Cornelis (JIRA) jira-events at lists.jboss.org
Fri Aug 5 08:53:32 EDT 2011

Query Interface

                 Key: SEAMPERSIST-63
                 URL: https://issues.jboss.org/browse/SEAMPERSIST-63
             Project: Seam Persistence
          Issue Type: Feature Request
            Reporter: Frank Cornelis
            Priority: Minor

The query interface allows for easy usage of JPA queries. Basically you annotate an interface as follows:
public interface QueryInterface {
		List<Person> getAll();

		Person getPersonByName(@QueryParam("name") String name);

		@QueryMethod(value = "person.select.by.name", nullable = true)
		Person findPersonByName(@QueryParam("name") String name);

		Query getAllQuery();
		@QueryMethod(query = "SELECT COUNT(*) FROM Person")
		Long countAll();
Using some inject QueryInterfaceFactory you can get a proxy on this interface that will interpret the annotations towards JPA queries. See attached patch for a basic implementation.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list