minor adaption to java 1.8
authorKatja Luther <k.luther@bgbm.org>
Tue, 21 Mar 2017 12:39:46 +0000 (13:39 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 21 Mar 2017 12:39:46 +0000 (13:39 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java

index 6fc530d1c8c4aa86a78630c23fd255e1a6f521ce..de911db88727f9c59882fbc148533f5124cffb65 100644 (file)
@@ -106,6 +106,7 @@ public class SearchManager {
        }
 
        public List<AgentBase> findAgents(IIdentifiableEntityServiceConfigurator configurator){
+
                if(checkLargeResult(CdmStore.getService(IAgentService.class).countByTitle(configurator))){
                        List<AgentBase> records = CdmStore.getService(IAgentService.class).findByTitle(configurator).getRecords();
                        addUuidSearchResults(records, configurator, IAgentService.class);
@@ -124,7 +125,7 @@ public class SearchManager {
         String titleSearchString = configurator.getTitleSearchString();
                try {
                    UUID uuid = UUID.fromString(titleSearchString);
-                   T foundRecord = CdmStore.getService(service).load(uuid, configurator.getPropertyPaths());
+                   T foundRecord = (T) CdmStore.getService(service).load(uuid, configurator.getPropertyPaths());
                    if(foundRecord!=null){
                        records.add(foundRecord);
                    }