/** * Get an instance of a specified EntitySqlDao class, sharing the same database session as the * initial sql dao class with which this wrapper factory was created. * * @param newSqlDaoClass the class to instantiate * @param <NewSqlDao> EntitySqlDao type to create * @return instance of NewSqlDao */ public <NewSqlDao extends EntitySqlDao<NewEntityModelDao, NewEntity>, NewEntityModelDao extends EntityModelDao<NewEntity>, NewEntity extends Entity> NewSqlDao become(final Class<NewSqlDao> newSqlDaoClass) { final NewSqlDao newSqlDao = SqlObjectBuilder.attach(handle, newSqlDaoClass); return create(newSqlDaoClass, newSqlDao); }
/** * Get an instance of a specified EntitySqlDao class, sharing the same database session as the * initial sql dao class with which this wrapper factory was created. * * @param newSqlDaoClass the class to instantiate * @param <NewSqlDao> EntitySqlDao type to create * @return instance of NewSqlDao */ public <NewSqlDao extends EntitySqlDao<NewEntityModelDao, NewEntity>, NewEntityModelDao extends EntityModelDao<NewEntity>, NewEntity extends Entity> NewSqlDao become(final Class<NewSqlDao> newSqlDaoClass) { final NewSqlDao newSqlDao = SqlObjectBuilder.attach(handle, newSqlDaoClass); return create(newSqlDaoClass, newSqlDao); }