Add method to sessionOwner objects to fine tune performance using property paths
[taxeditor.git] / eu.etaxonomy.taxeditor.cdmlib / src / main / java / eu / etaxonomy / taxeditor / session / CdmEntitySession.java
index b039d20c344687cd8d9382c803cdd9e88c85444b..97de82fcca7b4eead83b7f715edc051e3ce7e9a9 100644 (file)
@@ -14,6 +14,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
@@ -288,16 +289,13 @@ public class CdmEntitySession implements ICdmEntitySession  {
         return cdmTransientEntityCacher;
     }
 
-
-
-
-
-
-
-
-
-
-
-
+    @Override
+    public List<String> getPropertyPaths(Object obj) {
+        Map<Object, List<String>> propertyPathsMap = sessionOwner.getPropertyPathsMap();
+        if(propertyPathsMap == null || propertyPathsMap.isEmpty()) {
+            return null;
+        }
+        return propertyPathsMap.get(obj);
+    }
 
 }