All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sakaiproject.genericdao.hibernate.HibernateCompleteGenericDao Maven / Gradle / Ivy

Go to download

Generic Dao is a Java package which allows a developer to skip writing DAOs for their persistence objects when they are using Spring and/or Hibernate. The package was originally created by Aaron Zeckoski for the Evaluation System project but was repackaged to make it distributable by request. It is used in the RSF framework (http://www2.caret.cam.ac.uk/rsfwiki/). Note about the BeanUtils provided dependency: BeanUtils is not required if you are not using it in your project. Note about the Hibernate provided dependency: Hibernate is not required if you are not using it in your project.

There is a newer version: 0.12.0
Show newest version
/******************************************************************************
 * HibernateCompleteDao.java - created by [email protected]
 * 
 * Copyright (c) 2006 Aaron Zeckoski
 * Licensed under the Apache License, Version 2
 * 
 * A copy of the Apache License, Version 2 has been included in this 
 * distribution and is available at: http://www.apache.org/licenses/LICENSE-2.0.txt
 * 
 * Contributors:
 * Aaron Zeckoski ([email protected]) - primary
 * 
 *****************************************************************************/

package org.sakaiproject.genericdao.hibernate;

import java.util.List;

import org.sakaiproject.genericdao.api.CompleteGenericDao;

/**
 * A Hibernate (http://hibernate.org/) based implementation of CompleteGenericDao
 * which can be extended to add more specialized DAO methods.
 * 

* See the overview for installation/usage tips. * * @author Aaron Zeckoski ([email protected]) */ @SuppressWarnings("deprecation") public class HibernateCompleteGenericDao extends HibernateGeneralGenericDao implements CompleteGenericDao { /** * @deprecated */ @SuppressWarnings("unchecked") public List findByExample(Object exampleObject) { return findByExample(exampleObject, 0, 0); } /** * @deprecated */ @SuppressWarnings("unchecked") public List findByExample(Object exampleObject, int firstResult, int maxResults) { checkClass(exampleObject.getClass()); List items = getHibernateTemplate().findByExample(exampleObject, firstResult, maxResults); return items; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy