cn.sylinx.hbatis.ext.mirage.repository.DaoSingleton Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbatis-mirage Show documentation
Show all versions of hbatis-mirage Show documentation
hbatis mirage is a simple orm framework, extends hbatis-core
package cn.sylinx.hbatis.ext.mirage.repository;
import cn.sylinx.hbatis.ext.AbstractDaoSingleton;
import cn.sylinx.hbatis.ext.mirage.spi.MirageServiceManager;
public class DaoSingleton extends AbstractDaoSingleton {
public static final DaoSingleton ME = new DaoSingleton();
private DaoSingleton() {
}
@Override
protected String getDefaultDatasourceName() {
return MirageServiceManager.getMirageService().getDatasourceName();
}
@Override
protected DaoService createDaoService(String datasourceName) {
return new DaoServiceImpl(new BaseRepositoryImpl(datasourceName));
}
}