To return more than one bean for a single SELECT statement that queries more than one database object:
You want to run this statement, returning the result from the first table in a Contact bean and the result from the second table into a Person bean.
select CONTACTTABLE.IDNUMBER, PERSONTABLE.SSN from CONTACTTABLE, PERSONTABLE
You can define the generic class ContactAndPerson like this:
public class ContactAndPerson<C, P> extends LinkedList{}
You want to put all pairs of Contact and Person beans into an Iterator object. So, you define the return type like this:
@Select(sql = "select CONTACTTABLE.IDNUMBER, PERSONTABLE.SSN from CONTACTTABLE, PERSONTABLE")
Iterator<ContactAndPerson<Contact, Person>> selectFromContactPerson ();