Project

General

Profile

Download (1.93 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2007 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.persistence.dao.reference;
10

    
11
import java.util.List;
12
import java.util.Map;
13
import java.util.Set;
14

    
15
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
16
import eu.etaxonomy.cdm.model.reference.ISourceable;
17
import eu.etaxonomy.cdm.model.reference.OriginalSourceBase;
18
import eu.etaxonomy.cdm.persistence.dao.common.ICdmEntityDao;
19
import eu.etaxonomy.cdm.persistence.query.OrderHint;
20

    
21
public interface IOriginalSourceDao extends ICdmEntityDao<OriginalSourceBase>{
22

    
23
	/**
24
	 * Returns a map of identifiable entities of class <code>clazz</code> which have an original source of
25
	 * with namespace <code>idNamespace</code> and with an idInSource in <code>idInSourceList</code> <BR>
26
	 * The key of the map is the idInSource. If there are multiple objects that have the same id an arbitrary one is chosen.
27
	 */
28
	public <S extends ISourceable> Map<String, S> findOriginalSourcesByIdInSource(Class<S> clazz, Set<String> idInSourceSet, String idNamespace);
29

    
30

    
31
	/**
32
	 * Returns a list of identifiable entities according to their class, idInSource and idNamespace
33
	 */
34
	public <S extends ISourceable> List<S> findOriginalSourceByIdInSource(Class<S> clazz, String idInSource, String idNamespace);
35

    
36
	/**
37
	 * Returns the first OriginalSource with according idInSource and idNamespace
38
	 */
39
	public List<OriginalSourceBase> findOriginalSourceByIdInSource(String idInSource, String idNamespace);
40

    
41
    public <T extends DescriptionElementSource> List<T> listWithNameUsedInSource(Class<T> clazz, Integer pageSize, Integer pageNumber,
42
            List<OrderHint> orderHints, List<String> propertyPaths);
43

    
44
    public <T extends DescriptionElementSource> Long countWithNameUsedInSource(Class<T> clazz);
45

    
46
}
(1-1/2)