The following example shows getting all records from a particular table.
Note that alias names provided in the SQL query
matches with property names in result class POJO.
iBatis invokes appropriate setter method
based on alias names.
This POJO should have a no argument default constructor so that
iBatis creates an instance and sets mapped properties.
We have used Student.getAll string to query all students,
where Student is the query namespace and getAll
is the actual query id. There can be N number of queries in a single namespace.