@SuppressWarnings("unchecked")
D castDao = (D) dao;
return castDao;
}
DatabaseTable databaseTable = tableConfig.getDataClass().getAnnotation(DatabaseTable.class);
if (databaseTable == null || databaseTable.daoClass() == Void.class
|| databaseTable.daoClass() == BaseDaoImpl.class) {
@SuppressWarnings("deprecation")
Dao<T, ?> daoTmp = BaseDaoImpl.createDao(connectionSource, tableConfig);
dao = daoTmp;
} else {
Class<?> daoClass = databaseTable.daoClass();
Constructor<?> constructor;
try {
constructor = daoClass.getConstructor(ConnectionSource.class, DatabaseTableConfig.class);
} catch (Exception e) {
throw SqlExceptionUtil.create(