Quantcast

Using nested interfaces

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Using nested interfaces

Piotr Kosmowski

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?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using nested interfaces

Eduardo Macarron
Try with com.sample.package.SampleService$SampleMapper as namespace
and /com/.../SampleService$SampleMapper.xml as xml file.

That should work.

El día 18 de abril de 2012 15:27, Piotr Kosmowski <[hidden email]> escribió:

> 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?
>
> Question also posted
> on http://stackoverflow.com/questions/10210315/using-nested-interfaces-and-mapper-with-mybatis
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using nested interfaces

Piotr Kosmowski
It works! Thanks.

Loading...