class HibernateUserHistoryDAO extends HibernatePersistentObjectDAO<UserHistory> implements UserHistoryDAO {

	public List<UserHistory> findByUserId(long userId) {
		try {
			return findByWhere("_entity.userId =" + userId, "order by _entity.date asc", null);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
			return new ArrayList<UserHistory>();
		}
	}

	private  HibernateUserHistoryDAO();

}