use of org.mifos.application.master.business.MasterDataEntity in project head by mifos.
the class PenaltyDaoHibernate method doFetchListOfMasterDataFor.
@SuppressWarnings("unchecked")
private <T extends MasterDataEntity> List<T> doFetchListOfMasterDataFor(Class<T> type) {
Session session = StaticHibernateUtil.getSessionTL();
List<T> masterEntities = session.createQuery("from " + type.getName()).list();
for (MasterDataEntity masterData : masterEntities) {
Hibernate.initialize(masterData.getNames());
}
return masterEntities;
}
Aggregations