[Minor] Added TODO about .getBy() which returns clone, and querying

This commit is contained in:
Robert von Burg 2016-10-07 09:38:28 +02:00
parent 3be7f9e905
commit ba476b2f68
4 changed files with 4 additions and 1 deletions

View File

@ -118,6 +118,7 @@ public abstract class CachedElementMap<T extends StrolchRootElement> implements
if (t == null)
return null;
// TODO cloning has its issues, as queries don't return a clone!
@SuppressWarnings("unchecked")
T clone = (T) t.getClone();
clone.setVersion(t.getVersion());

View File

@ -118,6 +118,7 @@ public abstract class TransactionalElementMap<T extends StrolchRootElement> impl
if (!this.realm.getMode().isTransient())
return t;
// TODO cloning has its issues, as queries don't return a clone!
@SuppressWarnings("unchecked")
T clone = (T) t.getClone();
clone.setVersion(t.getVersion());

View File

@ -26,7 +26,6 @@ import li.strolch.persistence.api.PersistenceHandler;
import li.strolch.persistence.api.StrolchTransaction;
import li.strolch.privilege.model.Certificate;
import li.strolch.privilege.model.PrivilegeContext;
import li.strolch.runtime.StrolchConstants;
import li.strolch.runtime.configuration.ComponentConfiguration;
import li.strolch.utils.dbc.DBC;
import li.strolch.utils.helper.StringHelper;

View File

@ -92,6 +92,8 @@ public class InMemoryQuery<T extends StrolchRootElement, U> {
}
}
// TODO The ElementMaps return a clone, but here we don't...
return result;
}
}