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
|
|
10
|
package eu.etaxonomy.cdm.api.service;
|
11
|
|
12
|
import java.util.Collection;
|
13
|
import java.util.List;
|
14
|
import java.util.UUID;
|
15
|
import java.util.Map;
|
16
|
|
17
|
import eu.etaxonomy.cdm.model.reference.ReferenceBase;
|
18
|
|
19
|
|
20
|
public interface IReferenceService<T extends ReferenceBase> extends IIdentifiableEntityService<T> {
|
21
|
//public interface IReferenceService extends IIdentifiableEntityService<ReferenceBase> {
|
22
|
|
23
|
/** Finds reference by UUID **/
|
24
|
public abstract ReferenceBase getReferenceByUuid(UUID uuid);
|
25
|
|
26
|
/** Finds references by title **/
|
27
|
public List<T> getReferencesByTitle(String title);
|
28
|
|
29
|
/** Finds references of a certain kind by title **/
|
30
|
public List<T> getReferencesByTitle(String title, Class<T> clazz);
|
31
|
|
32
|
/** Gets all references **/
|
33
|
public abstract List<ReferenceBase> getAllReferences(int limit, int start);
|
34
|
|
35
|
// public abstract UUID saveReference(ReferenceBase reference);
|
36
|
|
37
|
/** Saves a reference and return its UUID **/
|
38
|
public abstract UUID saveReference(T reference);
|
39
|
|
40
|
// public abstract Map<UUID, ReferenceBase> saveReferenceAll(Collection<ReferenceBase> referenceCollection);
|
41
|
|
42
|
/** Saves a collection of references **/
|
43
|
public abstract Map<UUID, T> saveReferenceAll(Collection<T> referenceCollection);
|
44
|
|
45
|
}
|