Hi all,

now that ibatis 3 supports type-safe mapper interfaces that make a
nice interface to the repository/dao tier, it would be desirable to
allow for multiple parameters to be passed, so that application
designers would not be constrained while designing their layer
interfaces. For example, I would prefer:

List<User> findCommonFriends(User user1, User user2)

instead of

List<User> findCommonFriends(Map<String,User> users)

or

List<User> findCommonFriends(UserPair users)

It just requires a trivial modification in MapperMethod and a simple
mechanism to access positional parameters to get it working. For
example, MapperMethod could create a Map and put the first argument
under the key "first", the second one under "second", etc. That is,
positional access "by name". Of course, in case the number of
arguments were only one, the usual mechanism would follow.

What do you think? Personally I belive that this very simple change
will add some degrees of freedom to interface designers.

Best regards
--
Carlos

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to