Java Code Examples for org.springframework.orm.hibernate3.support.HibernateDaoSupport

The following are top voted examples for showing how to use org.springframework.orm.hibernate3.support.HibernateDaoSupport. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: wl   File: UnitDocumentManager.java   View source code 5 votes vote down vote up
private PageBean findDocumentWithPageByUnitIdentifyIdAndTime(UnitDocument document,String type,int pageSize,
		int page,HibernateDaoSupport dao){
	
	String hql=createHqlWithTime(createHqlWithUnitId(createBasisHql(document,type),document),document);
	//maybe wrong
	return createPageBeanFromThisHql(document, pageSize, page, dao, hql);
}
 
Example 2
Project: wl   File: UnitDocumentManager.java   View source code 5 votes vote down vote up
private PageBean createPageBeanFromThisHql(UnitDocument document,
		int pageSize, int page, HibernateDaoSupport dao, String hql) {
	List<Object>list=dao.getHibernateTemplate().findByExample(document);
	int totalRow=list.size();
	PageHandler ph=new PageHandler();
	PageBean pb=ph.queryForPage(dao, hql, totalRow, pageSize, page);
	return pb;
}
 
Example 3
Project: wl   File: PersonalDocumentManager.java   View source code 5 votes vote down vote up
private PageBean findDocumentWithPageBySocialInsuranceNumberAndTime(PersonalDocument document,String type,int pageSize,
		int page,HibernateDaoSupport dao){
	
	String hql=createHqlWithIdentifyCardId(
			createHqlWithTime(createHqlWithSocialInsuranceNumber(createBasisHql(document,type),document),document),document);
	//maybe wrong
	return createPageBeanFromThisHql(document, pageSize, page, dao, hql);
}
 
Example 4
Project: wl   File: PersonalDocumentManager.java   View source code 5 votes vote down vote up
private PageBean createPageBeanFromThisHql(PersonalDocument document,
		int pageSize, int page, HibernateDaoSupport dao, String hql) {
	List<Object>list=dao.getHibernateTemplate().findByExample(document);
	int totalRow=list.size();
	PageHandler ph=new PageHandler();
	PageBean pb=ph.queryForPage(dao, hql, totalRow, pageSize, page);
	return pb;
}
 
Example 5
Project: gocd   File: TransactionCacheInterceptorTest.java   View source code 5 votes vote down vote up
@Before
public void setUp() throws Exception {
    configHelper.usingCruiseConfigDao(goConfigDao);
    configHelper.onSetUp();
    dbHelper.onSetUp();
    goCache.clear();
    hibernateDaoSupport = new HibernateDaoSupport() {
    };
    hibernateDaoSupport.setSessionFactory(sessionFactory);
    assertionUtil = new TransactionCacheAssertionUtil(goCache, transactionTemplate);
}
 
Example 6
Project: esup-smsu   File: HibernateUtils.java   View source code 4 votes vote down vote up
public static SessionFactory getSessionFactory(ApplicationContext applicationContext) {
return ((HibernateDaoSupport) applicationContext.getBean("daoService")).getSessionFactory();
   }