reverting last commit - will be committed again later
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / ICommonService.java
index efe6dfc68f85d3f1c1e7347eadb9a0fb1035c9a2..4cd11212b320f99a850e222f44ad2e49825b2aa0 100644 (file)
@@ -15,6 +15,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import eu.etaxonomy.cdm.database.DatabaseSchemaMismatchException;
 import eu.etaxonomy.cdm.model.common.CdmBase;
 import eu.etaxonomy.cdm.model.common.CdmMetaData;
 import eu.etaxonomy.cdm.model.common.ISourceable;
@@ -49,7 +50,24 @@ public interface ICommonService extends IService<OriginalSourceBase>{
        public Map<MetaDataPropertyName, CdmMetaData> getCdmMetaData();
        
        
-       /** find cdmBase by UUID**/
+       /**
+        * Returns a map of identifiable entities of class <code>clazz</code> which have an original source of 
+        * with namespace <code>idNamespace</code> and with an idInSource in <code>idInSourceSet</code> <BR>
+        * The key of the map is the idInSource. If there are multiple objects that have the same id an arbitrary one is chosen.
+        * @param clazz
+        * @param idInSourceSet
+        * @param idNamespace
+        * @return
+        */
+       public Map<String, ? extends ISourceable> getSourcedObjectsByIdInSource(Class clazz, Set<String> idInSourceSet, String idNamespace);
+       
+       /**
+        * Returns a list of identifiable entities according to their class, idInSource and idNamespace
+        * @param clazz
+        * @param idInSource
+        * @param idNamespace
+        * @return
+        */
        public ISourceable getSourcedObjectByIdInSource(Class clazz, String idInSource, String idNamespace);
 
        
@@ -88,7 +106,4 @@ public interface ICommonService extends IService<OriginalSourceBase>{
        
        public List getHqlResult(String hqlQuery);
 
-
-
-
 }