10Works with any database that has a JDBC driver (no plugins required)9Configurable caching (including dependencies)8Local and Global transaction support and management (JTA)7Simple XML mapping document structure 6Supports Map, Collection, List and Primitive Wrappers (Integer, String etc.)5Supports JavaBeans classes (get/set methods)4Supports complex object mappings (populating lists, complex object models etc.)3Object models are never perfect (no changes required!)2Database designs are never perfect (no changes required!)1You already know SQL, why waste time learning something else?
IBATIS SQL Maps架構－ibatis-sqlmap.jar
<select id="getAddress" parameterClass="int" resultClass="examples.domain.Address"> select ADR_ID as id, ADR_DESCRIPTION as description, ADR_STREET as street, ADR_CITY as city, ADR_PROVINCE as province, ADR_POSTAL_CODE as postalCode from ADDRESS where ADR_ID = #value#</select>
Integer pk = new Integer(5); Address address = (Address)sqlMap.queryForObject("getAddress", pk);