Project

General

Profile

Revision c20c3c47

IDc20c3c475a4a21fc91e8b7c6270db38a99caf372
Parent d510084b
Child 69be8cb3

Added by Andreas Kohlbecker over 3 years ago

fixing missing paging criteria in TypeDesignation DAO

View differences:

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/name/TypeDesignationHibernateImpl.java
1 1
/**
2 2
 * Copyright (C) 2007 EDIT
3
 * European Distributed Institute of Taxonomy 
3
 * European Distributed Institute of Taxonomy
4 4
 * http://www.e-taxonomy.eu
5
 * 
5
 *
6 6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 7
 * See LICENSE.TXT at the top of this package for the full license terms.
8 8
 *
......
24 24
 *
25 25
 */
26 26
@Repository
27
public class TypeDesignationHibernateImpl<T extends TypeDesignationBase> 
27
public class TypeDesignationHibernateImpl<T extends TypeDesignationBase>
28 28
			extends ReferencedEntityDaoImpl<TypeDesignationBase> implements ITypeDesignationDao {
29 29
	@SuppressWarnings("unused")
30 30
	private static final Logger logger = Logger.getLogger(TypeDesignationHibernateImpl.class);
31 31

  
32 32
	public TypeDesignationHibernateImpl() {
33
		super(TypeDesignationBase.class); 
33
		super(TypeDesignationBase.class);
34 34
	}
35 35

  
36 36
	//TODO limit start
37
	public List<TypeDesignationBase> getAllTypeDesignations(Integer limit, Integer start) {
37
	@Override
38
    public List<TypeDesignationBase> getAllTypeDesignations(Integer limit, Integer start) {
38 39
		Criteria crit = getSession().createCriteria(TypeDesignationBase.class);
40
		if(limit != null){
41
		    crit.setMaxResults(limit);
42
		}
43
		if(start != null){
44
		    crit.setFirstResult(start);
45
		}
39 46
		List<TypeDesignationBase> results = crit.list();
40 47
		return results;
41 48
	}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)