changeset 67:ae732119447f

small fixes.
author casties
date Tue, 31 Jan 2017 18:08:55 +0100
parents 3e4b05a6cb47
children 677492395dc0
files src/main/java/org/mpi/openmind/cache/WrapperService.java
diffstat 1 files changed, 8 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/mpi/openmind/cache/WrapperService.java	Mon Jan 30 20:32:26 2017 +0100
+++ b/src/main/java/org/mpi/openmind/cache/WrapperService.java	Tue Jan 31 18:08:55 2017 +0100
@@ -668,7 +668,7 @@
 		txLog.debug("** START save entity: user="+user+" entity="+entity.toSmallString());
 		// check if entity is up to date with cache
 		if (!cache.isEntityCurrent(entity)) {
-			logger.error("Possible collision: Entity to save not current!");
+			logger.warn("Possible collision: Entity to save not current!");
 			// create differences from cache
 			EntityDiff diff = cache.diffEntityCache(entity, true);
 			if (diff != null) {
@@ -730,8 +730,10 @@
 						}
 					}
 				} else {
-					logger.warn("save without EditIntent!");
+					logger.warn("Save with missing EditIntent!");
 				}
+			} else {
+				logger.warn("but no difference to cache found.");
 			}
 		}
 		
@@ -952,7 +954,7 @@
 
 		List<Relation> tarRelList = this.cache.getRelsByTarId(tarId);
 
-		long start = System.currentTimeMillis();
+		//long start = System.currentTimeMillis();
 		int count = 0;
 		for (Relation rel : tarRelList) {
 			if (stringEquals(relationName, rel.getOwnValue())
@@ -1035,14 +1037,10 @@
 
 	public List<Relation> getTargetRelations(Entity target,
 			String relationName, String srcObjClass, int maxResult) {
-		long start = System.currentTimeMillis();
+		//long start = System.currentTimeMillis();
 		List<Relation> list = new ArrayList<Relation>();
 
 		List<Relation> tarRelList = this.cache.getRelsByTarId(target.getId());
-		/*
-		 * if(coll == null){ coll = this.getPS().getTargetRelations(target,
-		 * null, null, -1, false); cache.setRelsForTar(target.getId(), coll); }
-		 */
 
 		int count = 0;
 		for (Relation rel : tarRelList) {
@@ -1058,8 +1056,7 @@
 						break;
 					}
 				} else {
-					logger.error("#########ERROR: Relation without source "
-							+ rel.toString());
+					logger.error("Relation without source: "+ rel.toString());
 				}
 
 			}
@@ -1082,7 +1079,7 @@
 			String relationName, String tarObjClass, int maxResult)
 			throws Exception {
 
-		long start = System.currentTimeMillis();
+		//long start = System.currentTimeMillis();
 		List<Relation> list = new ArrayList<Relation>();
 
 		// the collection coll should not be modified