you can define you sql in your PersonMapper.xml under myproject.persistence package (notice:the interface should be in the same package with the xml ).like blow:
<mapper namespace="myproject.persistence.PersonMapper">
<select id="getByLastName" parameterType="string" resultType="myproject.domain.Person">
SELECT * FROM PersonTable WHERE PersonTable.LAST_NAME = #{lastName}
</select>
mybatis will auto look for the method you defined in the xml files.