-// $Id$
/**
* Copyright (C) 2007 EDIT
* European Distributed Institute of Taxonomy
import java.util.List;
import java.util.UUID;
+import eu.etaxonomy.cdm.api.service.config.IIdentifiableEntityServiceConfigurator;
import eu.etaxonomy.cdm.api.service.pager.Pager;
import eu.etaxonomy.cdm.model.agent.Address;
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.agent.InstitutionalMembership;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.cdm.persistence.dto.TeamOrPersonUuidAndTitleCache;
import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
import eu.etaxonomy.cdm.persistence.query.OrderHint;
import eu.etaxonomy.cdm.strategy.merge.MergeException;
@Override
public Pager<AgentBase> search(Class<? extends AgentBase> clazz, String queryString, Integer pageSize, Integer pageNumber, List<OrderHint> orderHints, List<String> propertyPaths);
- /**
- * Returns a list of <code>UuidAndTitleCache</code> containing all <code>Person</code>s
- *
- * @return a list of <code>UuidAndTitleCache</code> instances
- */
- public List<UuidAndTitleCache<Person>> getPersonUuidAndTitleCache();
-
- /**
- * Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> objects
- * with their respective titleCache
- *
- * @return a list of <code>UuidAndTitleCache</code> instances
- */
- public List<UuidAndTitleCache<Team>> getTeamUuidAndTitleCache();
-
/**
* Returns a list of <code>UuidAndTitleCache</code> containing all <code>TeamOrPersonBase</code> objects
* with their respective nomenclaturalTitle instead of regular titleCache
*/
public List<UuidAndTitleCache<Team>> getTeamUuidAndNomenclaturalTitle();
- /**
- * Returns a list of <code>UuidAndTitleCache</code> containing all {@link Institution} objects
- * with their respective titleCache
- *
- * @return a list of <code>UuidAndTitleCache</code> instances
- */
- public List<UuidAndTitleCache<Institution>> getInstitutionUuidAndTitleCache();
-
-
/**
* Returns a list of <code>UuidAndTitleCache</code> containing all {@link Institution} objects
* with their respective NomenclaturalTitleCache
*
* @return a list of <code>UuidAndTitleCache</code> instances
*/
- public List<UuidAndTitleCache<AgentBase>> getUuidAndAbbrevTitleCache();
+ public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getUuidAndAbbrevTitleCache(Class<T> clazz, Integer limit, String pattern);
/**
- * @param teamUuid
- * @return
- * @throws MergeException
+ * Returns a list of <code>UuidAndTitleCache</code> containing all {@link Institution} objects
+ * with their respectiveCollectorTitleCache
+ *
+ * @return a list of <code>UuidAndTitleCache</code> instances
+ */
+ public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getUuidAndTitleCacheWithCollectorTitleCache(Class<T> clazz, Integer limit, String pattern);
+
+ /**
+ * Returns a list of <code>UuidAndTitleCache</code> containing all {@link Institution} objects
+ * with their respectiveCollectorTitleCache
+ *
+ * @return a list of <code>UuidAndTitleCache</code> instances
*/
+ public <T extends AgentBase> List<TeamOrPersonUuidAndTitleCache<T>> getTeamOrPersonUuidAndTitleCache(Class<T> clazz, Integer limit, String pattern);
+
+
public UpdateResult convertTeam2Person(UUID teamUuid) throws MergeException;
/**
* <BR>
* If the person can not be replaced a {@link MergeException} is thrown.
*
+ * The new team is created by setting the titleCache and nomenclaturalTitle to protected
+ * and copy it. Also supplemental data is copied to the team.
+ * The old person is fully deleted, not added as member to the new team.
+ *
* @param person the {@link Person} to be converted
* @return the new team that replaces the given person
* @throws MergeException if anything else goes wrong during merge
*/
public UpdateResult convertPerson2Team(Person person) throws MergeException, IllegalArgumentException;
-}
+ public <T extends AgentBase<?>> List<T> findByTitleAndAbbrevTitle(IIdentifiableEntityServiceConfigurator<T> config);
+
+}
\ No newline at end of file