Author: areshetnyak
Date: 2009-11-16 05:38:24 -0500 (Mon, 16 Nov 2009)
New Revision: 680
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
Log:
EXOJCR-201 : The JDBCCacheLoader was changed (more detailed TODO).
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
===================================================================
---
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-16
10:32:05 UTC (rev 679)
+++
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-16
10:38:24 UTC (rev 680)
@@ -161,11 +161,13 @@
if ( modification.getFqn().size() == 2 &&
(modification.getFqn().get(0).equals(JBossCacheStorage.NODES) ||
modification.getFqn().get(0).equals(JBossCacheStorage.PROPS)))
{
-
+
+ // TODO The removed ItemData was setting to value in prepareModifications();
+ // That is need because we do not get NodeData from DB if we delete property
with primaytype.
+
// String identifier = (String) modification.getFqn().get(1);
// ItemData itemData = jdbcConnection.getItemData(identifier);
- // TODO the removed ItemData is setting in value in prepareModifications();
ItemData itemData = (ItemData) modification.getValue();
if (itemData instanceof NodeData)
@@ -357,7 +359,7 @@
{
NodeData parentNodeData = (NodeData)
conn.getItemData((String)name.get(1));
- //TODO rainf0x
+ //TODO We do not throw exception if parentNodeData not exists in DB,
because we use that method (get(Fqn name)) in exists(Fqn name).
/*if (parentNodeData == null)
throw new JDBCCacheLoaderException("The parent node with ID =
" + (String)name.get(1) + " not exis, FQN = '" + name +
"'.");*/
@@ -405,7 +407,7 @@
*/
public boolean exists(Fqn name) throws Exception
{
- // TODO do it with less cost
+ // TODO Will be created specialization code to checking exist node or property in
DB without getting NodeData or PropertyData from DB.
return get(name) != null;
}
@@ -440,11 +442,6 @@
conn.close();
}
}
- else if (name.equals(Fqn.ROOT))
- {
-// childs.add(JBossCacheStorage.NODES);
-// childs.add(JBossCacheStorage.PROPS);
- }
return (childs.size() == 0 ? null : childs);
}
Show replies by date