eu.etaxonomy.cdm.api.service
Interface ICommonService

All Superinterfaces:
IService<OriginalSourceBase>
All Known Implementing Classes:
CommonServiceImpl

public interface ICommonService
extends IService<OriginalSourceBase>


Method Summary
<T extends IMatchable>
List<T>
findMatching(T objectToMatch, IMatchStrategy matchStrategy)
          Returns all objects that match the object to match according to the given match strategy.
 Map<CdmMetaData.MetaDataPropertyName,CdmMetaData> getCdmMetaData()
          Returns all meta data.
 List getHqlResult(String hqlQuery)
           
 Set<CdmBase> getReferencingObjects(CdmBase referencedCdmBase)
          Returns all CdmBase objects that reference the referencedCdmBase.
 ISourceable getSourcedObjectByIdInSource(Class clazz, String idInSource, String idNamespace)
          Returns a list of identifiable entities according to their class, idInSource and idNamespace
 Map<String,? extends ISourceable> getSourcedObjectsByIdInSource(Class clazz, Set<String> idInSourceSet, String idNamespace)
          Returns a map of identifiable entities of class clazz which have an original source of with namespace idNamespace and with an idInSource in idInSourceSet
The key of the map is the idInSource.
<T extends IMergable>
void
merge(T mergeFirst, T mergeSecond, IMergeStrategy mergeStrategy)
          Merges mergeSecond into mergeFirst.
 void saveAllMetaData(Collection<CdmMetaData> metaData)
          Saves all meta data
 
Methods inherited from interface eu.etaxonomy.cdm.api.service.IService
clear, count, delete, exists, find, find, find, findById, getSession, group, list, list, load, load, lock, merge, page, refresh, refresh, rows, save, save, saveOrUpdate, saveOrUpdate, update
 

Method Detail

saveAllMetaData

void saveAllMetaData(Collection<CdmMetaData> metaData)
Saves all meta data

Parameters:
metaData -

getCdmMetaData

Map<CdmMetaData.MetaDataPropertyName,CdmMetaData> getCdmMetaData()
Returns all meta data.

Returns:

getSourcedObjectsByIdInSource

Map<String,? extends ISourceable> getSourcedObjectsByIdInSource(Class clazz,
                                                                Set<String> idInSourceSet,
                                                                String idNamespace)
Returns a map of identifiable entities of class clazz which have an original source of with namespace idNamespace and with an idInSource in idInSourceSet
The key of the map is the idInSource. If there are multiple objects that have the same id an arbitrary one is chosen.

Parameters:
clazz -
idInSourceSet -
idNamespace -
Returns:

getSourcedObjectByIdInSource

ISourceable getSourcedObjectByIdInSource(Class clazz,
                                         String idInSource,
                                         String idNamespace)
Returns a list of identifiable entities according to their class, idInSource and idNamespace

Parameters:
clazz -
idInSource -
idNamespace -
Returns:

getReferencingObjects

Set<CdmBase> getReferencingObjects(CdmBase referencedCdmBase)
Returns all CdmBase objects that reference the referencedCdmBase. For example, if referencedCdmBase is an agent it may return all taxon names that have this person as an author but also all books, articles, etc. that have this person as an author

Parameters:
referencedCdmBase -
Returns:

merge

<T extends IMergable> void merge(T mergeFirst,
                                 T mergeSecond,
                                 IMergeStrategy mergeStrategy)
           throws MergeException
Merges mergeSecond into mergeFirst. All references to mergeSecond will be replaced by references to merge first. If no merge strategy is defined (null), the DefaultMergeStrategy will be taken as default.

Type Parameters:
T -
Parameters:
mergeFirst -
mergeSecond -
mergeStrategy -
Throws:
MergeException

findMatching

<T extends IMatchable> List<T> findMatching(T objectToMatch,
                                            IMatchStrategy matchStrategy)
                                        throws MatchException
Returns all objects that match the object to match according to the given match strategy. If no match strategy is defined the default match strategy is taken.

Type Parameters:
T -
Parameters:
objectToMatch -
matchStrategy -
Returns:
Throws:
MatchException

getHqlResult

List getHqlResult(String hqlQuery)


Copyright © 2007-2013 EDIT. All Rights Reserved.