Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-18 10:04:27 -0400
committerEike Stepper2008-10-18 10:04:27 -0400
commit2e18581ba2bdda0bb423988f3a747062041c4a25 (patch)
treed8658a97f1172f95b68f97481318b8b6224b4cfd
parent51e3f0c7a5b272b7ee8e0e90bc05475b69399df0 (diff)
downloadcdo-2e18581ba2bdda0bb423988f3a747062041c4a25.tar.gz
cdo-2e18581ba2bdda0bb423988f3a747062041c4a25.tar.xz
cdo-2e18581ba2bdda0bb423988f3a747062041c4a25.zip
[249847] Store resources in a hierarchical structurecommitters/estepper/structured-resources
https://bugs.eclipse.org/bugs/show_bug.cgi?id=249847
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java35
1 files changed, 23 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
index 9ada759e7f..982c5da1dc 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/HorizontalMappingStrategy.java
@@ -186,19 +186,30 @@ public class HorizontalMappingStrategy extends MappingStrategy
builder.append(CDODBSchema.ATTRIBUTES_CONTAINER);
builder.append("=");
builder.append(CDOIDUtil.getLong(folderID));
- builder.append(" AND ");
- builder.append(nameField);
- if (exactMatch)
+ if (exactMatch || name != null)
{
- builder.append("=\'");
- builder.append(name);
- builder.append("\'");
- }
- else
- {
- builder.append(" LIKE \'");
- builder.append(name);
- builder.append("%\'");
+ builder.append(" AND ");
+ builder.append(nameField);
+ if (exactMatch)
+ {
+ if (name == null)
+ {
+ builder.append(" IS NULL");
+ }
+ else
+ {
+ builder.append("=\'");
+ builder.append(name);
+ builder.append("\'");
+ }
+ }
+ else
+ {
+ // Here: name != null
+ builder.append(" LIKE \'");
+ builder.append(name);
+ builder.append("%\'");
+ }
}
String sql = builder.toString();

Back to the top