[Minor] Added TODO about .getBy() which returns clone, and querying
This commit is contained in:
parent
3be7f9e905
commit
ba476b2f68
|
@ -118,6 +118,7 @@ public abstract class CachedElementMap<T extends StrolchRootElement> implements
|
||||||
if (t == null)
|
if (t == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// TODO cloning has its issues, as queries don't return a clone!
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T clone = (T) t.getClone();
|
T clone = (T) t.getClone();
|
||||||
clone.setVersion(t.getVersion());
|
clone.setVersion(t.getVersion());
|
||||||
|
|
|
@ -118,6 +118,7 @@ public abstract class TransactionalElementMap<T extends StrolchRootElement> impl
|
||||||
if (!this.realm.getMode().isTransient())
|
if (!this.realm.getMode().isTransient())
|
||||||
return t;
|
return t;
|
||||||
|
|
||||||
|
// TODO cloning has its issues, as queries don't return a clone!
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
T clone = (T) t.getClone();
|
T clone = (T) t.getClone();
|
||||||
clone.setVersion(t.getVersion());
|
clone.setVersion(t.getVersion());
|
||||||
|
|
|
@ -26,7 +26,6 @@ import li.strolch.persistence.api.PersistenceHandler;
|
||||||
import li.strolch.persistence.api.StrolchTransaction;
|
import li.strolch.persistence.api.StrolchTransaction;
|
||||||
import li.strolch.privilege.model.Certificate;
|
import li.strolch.privilege.model.Certificate;
|
||||||
import li.strolch.privilege.model.PrivilegeContext;
|
import li.strolch.privilege.model.PrivilegeContext;
|
||||||
import li.strolch.runtime.StrolchConstants;
|
|
||||||
import li.strolch.runtime.configuration.ComponentConfiguration;
|
import li.strolch.runtime.configuration.ComponentConfiguration;
|
||||||
import li.strolch.utils.dbc.DBC;
|
import li.strolch.utils.dbc.DBC;
|
||||||
import li.strolch.utils.helper.StringHelper;
|
import li.strolch.utils.helper.StringHelper;
|
||||||
|
|
|
@ -92,6 +92,8 @@ public class InMemoryQuery<T extends StrolchRootElement, U> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO The ElementMaps return a clone, but here we don't...
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue