diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java index 01d8794807..2cad3dca36 100644 --- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java +++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/clustering/ObjyPlacementManagerImpl.java @@ -1,54 +1,54 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ibrahim Sallam - initial API and implementation
- */
-package org.eclipse.emf.cdo.server.internal.objectivity.clustering;
-
-import org.eclipse.emf.cdo.server.internal.objectivity.db.ObjyObject;
-import org.eclipse.emf.cdo.server.internal.objectivity.db.ObjyScope;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import com.objy.db.app.ooId;
-
-public class ObjyPlacementManagerImpl implements ObjyPlacementManager
-{
-
- private String resourceContName = "resCont";
-
- private String dbName = "DB";
-
- private String defContName = "DefaultCont";
-
- private String genContName = "Cont";
-
- /**
- * Only used when we can't figure out a near object, so we'll end up putting the object in a default location.
- */
- public ooId getNearObject(ObjyObject parent, EStructuralFeature feature, EClass newClassObject)
- {
- ObjyScope objyScope = null;
-
- if (parent == null)
- {
- objyScope = new ObjyScope(dbName, resourceContName);
- }
- else if (feature == null)
- {
- objyScope = new ObjyScope(dbName, defContName);
- }
- else
- {
- objyScope = new ObjyScope(dbName, genContName);
- }
- return objyScope.getScopeContOid();
- }
-
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Ibrahim Sallam - initial API and implementation + */ +package org.eclipse.emf.cdo.server.internal.objectivity.clustering; + +import org.eclipse.emf.cdo.server.internal.objectivity.db.ObjyObject; +import org.eclipse.emf.cdo.server.internal.objectivity.db.ObjyScope; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; + +import com.objy.db.app.ooId; + +public class ObjyPlacementManagerImpl implements ObjyPlacementManager +{ + + private String resourceContName = "resCont"; + + private String dbName = "DB"; + + private String defContName = "DefaultCont"; + + private String genContName = "Cont"; + + /** + * Only used when we can't figure out a near object, so we'll end up putting the object in a default location. + */ + public ooId getNearObject(ObjyObject parent, EStructuralFeature feature, EClass newClassObject) + { + ObjyScope objyScope = null; + + if (parent == null) + { + objyScope = new ObjyScope(dbName, resourceContName); + } + else if (feature == null) + { + objyScope = new ObjyScope(dbName, defContName); + } + else + { + objyScope = new ObjyScope(dbName, genContName); + } + return objyScope.getScopeContOid(); + } + +} |