Using nested interfaces

27 views
Skip to first unread message

Piotr Kosmowski

unread,
Apr 18, 2012, 9:27:21 AM4/18/12
to mybati...@googlegroups.com

Is it possible to use nested mapper interface?:

package com.sample.package;

public class SampleService{

 
public interface SampleMapper{
   
public List<MyEntity> selectAllEntities();
 
}
}

And if yes:

  • where to put mapper xml file?
  • what should be the name of xml file?
  • what namespace shoud I put in mapper xml file for interface?

Eduardo Macarron

unread,
Apr 18, 2012, 11:49:39 AM4/18/12
to mybati...@googlegroups.com
Try with com.sample.package.SampleService$SampleMapper as namespace
and /com/.../SampleService$SampleMapper.xml as xml file.

That should work.

Piotr Kosmowski

unread,
Apr 20, 2012, 2:58:49 AM4/20/12
to mybati...@googlegroups.com
It works! Thanks.

Reply all
Reply to author
Forward
0 new messages