Lots of changes, including adding List<OrderHint> orderHints, List<String> propertyPa...
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / IIdentifiableEntityService.java
1 // $Id$
2 /**
3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
6 *
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
9 */
10
11 package eu.etaxonomy.cdm.api.service;
12
13 import java.util.List;
14
15 import eu.etaxonomy.cdm.api.service.pager.Pager;
16 import eu.etaxonomy.cdm.model.common.ISourceable;
17 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
18 import eu.etaxonomy.cdm.model.common.OriginalSource;
19 import eu.etaxonomy.cdm.model.media.Rights;
20 import eu.etaxonomy.cdm.persistence.dao.BeanInitializer;
21
22 public interface IIdentifiableEntityService<T extends IdentifiableEntity> extends IAnnotatableService<T> {
23
24 /**
25 * (Re-)generate the title caches for all objects of this concrete IdentifiableEntity class
26 */
27 public abstract void generateTitleCache();
28
29 /**
30 * Return a Pager of sources belonging to this object
31 *
32 * @param t The identifiable entity
33 * @param pageSize The maximum number of sources returned (can be null for all sources)
34 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
35 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
36 * @return a Pager of OriginalSource entities
37 */
38 public Pager<OriginalSource> getSources(T t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
39
40 /**
41 * Return a Pager of rights belonging to this object
42 *
43 * @param t The identifiable entity
44 * @param pageSize The maximum number of rights returned (can be null for all rights)
45 * @param pageNumber The offset (in pageSize chunks) from the start of the result set (0 - based)
46 * @param propertyPaths properties to initialize - see {@link BeanInitializer#initialize(Object, List)}
47 * @return a Pager of Rights entities
48 */
49 public Pager<Rights> getRights(T t, Integer pageSize, Integer pageNumber, List<String> propertyPaths);
50
51 public abstract ISourceable getSourcedObjectByIdInSource(Class clazz, String idInSource, String idNamespace);
52 }