From 61f91f41d7c26a3b668303864165371d6830eadf Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Mon, 29 Nov 2010 07:32:36 +0000
Subject: [PATCH] LMS-1372 PEs and DAOs adapted to database changes. Database
 Version increased to 062

SVN: 18913
---
 .../generic/server/UploadingCommandTest.java  |  6 +-
 .../postgresql/DumpPreparator.java            |  2 +
 .../generic/server/AbstractServer.java        | 10 +--
 .../openbis/generic/server/CommonServer.java  | 10 +--
 .../api/v1/GeneralInformationService.java     | 16 ++---
 .../authorization/PredicateExecutor.java      | 20 +++---
 .../business/bo/AbstractBusinessObject.java   | 12 ++--
 .../bo/AbstractSampleBusinessObject.java      | 22 +++---
 ...bstractSampleIdentifierBusinessObject.java |  4 +-
 .../server/business/bo/ExperimentBO.java      | 12 ++--
 .../server/business/bo/ExternalDataBO.java    |  2 +-
 .../server/business/bo/ExternalDataTable.java |  6 +-
 .../generic/server/business/bo/GroupBO.java   | 22 +++---
 .../generic/server/business/bo/IGroupBO.java  |  6 +-
 .../generic/server/business/bo/ProjectBO.java | 20 +++---
 .../business/bo/RoleAssignmentTable.java      |  6 +-
 .../generic/server/business/bo/SampleBO.java  |  2 +-
 .../server/business/bo/SampleTable.java       | 14 ++--
 .../business/bo/SimpleDataSetHelper.java      |  4 +-
 .../entity/ISecondaryEntityListingQuery.java  | 21 +++---
 .../bo/common/entity/SecondaryEntityDAO.java  |  2 +-
 .../bo/samplelister/ISampleListingQuery.java  | 32 ++++-----
 .../bo/samplelister/SampleLister.java         |  2 +-
 .../bo/samplelister/SampleListingWorker.java  |  6 +-
 .../bo/samplelister/SampleRecord.java         |  4 +-
 .../server/business/bo/util/SampleOwner.java  | 36 +++++-----
 .../business/bo/util/SampleOwnerFinder.java   | 10 +--
 .../server/business/bo/util/SampleUtils.java  |  8 +--
 .../dataaccess/IAuthorizationDAOFactory.java  |  2 +-
 .../server/dataaccess/IProjectDAO.java        | 10 +--
 .../server/dataaccess/IRoleAssignmentDAO.java |  4 +-
 .../generic/server/dataaccess/ISampleDAO.java | 18 ++---
 .../{IGroupDAO.java => ISpaceDAO.java}        | 24 +++----
 .../db/AuthorizationDAOFactory.java           |  8 +--
 .../dataaccess/db/DatabaseVersionHolder.java  |  2 +-
 .../dataaccess/db/HibernateSearchDAO.java     |  2 +-
 .../db/HibernateSearchDataProvider.java       |  6 +-
 .../server/dataaccess/db/ProjectDAO.java      | 25 ++++---
 .../dataaccess/db/RoleAssignmentDAO.java      | 14 ++--
 .../server/dataaccess/db/SampleDAO.java       | 38 +++++-----
 .../db/{GroupDAO.java => SpaceDAO.java}       | 48 ++++++-------
 .../search/detailed/IndexFieldNameHelper.java |  4 +-
 .../server/util/GroupIdentifierHelper.java    | 10 +--
 .../shared/LogMessagePrefixGenerator.java     |  4 +-
 .../IAuthorizationDataProvider.java           |  8 +--
 .../authorization/RoleWithIdentifier.java     | 14 ++--
 .../predicate/AbstractGroupPredicate.java     | 10 +--
 .../predicate/AbstractTechIdPredicate.java    |  4 +-
 .../DataSetCodeCollectionPredicate.java       |  4 +-
 .../predicate/DataSetCodePredicate.java       |  2 +-
 .../validator/SpaceValidator.java             |  4 +-
 .../generic/shared/dto/ColumnNames.java       |  4 +-
 .../generic/shared/dto/DataSetAccessPE.java   | 20 +++---
 .../openbis/generic/shared/dto/EventPE.java   |  2 +-
 .../openbis/generic/shared/dto/PersonPE.java  | 12 ++--
 .../openbis/generic/shared/dto/ProjectPE.java | 29 ++++----
 .../generic/shared/dto/RoleAssignmentPE.java  | 20 +++---
 .../generic/shared/dto/SampleAccessPE.java    |  4 +-
 .../openbis/generic/shared/dto/SamplePE.java  | 22 +++---
 .../generic/shared/dto/SequenceNames.java     |  2 +-
 .../openbis/generic/shared/dto/Session.java   |  6 +-
 .../shared/dto/{GroupPE.java => SpacePE.java} | 20 +++---
 .../generic/shared/dto/TableNames.java        |  2 +-
 .../shared/dto/ValidationMessages.java        |  2 +-
 .../dto/hibernate/SearchFieldConstants.java   |  2 +-
 .../dto/identifier/IdentifierHelper.java      |  8 +--
 .../translator/AttachmentTranslator.java      |  2 +-
 .../translator/ExternalDataTranslator.java    |  2 +-
 .../shared/translator/GroupTranslator.java    | 10 +--
 .../shared/translator/ProjectTranslator.java  |  2 +-
 .../translator/RoleAssignmentTranslator.java  |  4 +-
 .../shared/translator/SampleTranslator.java   |  2 +-
 .../generic/shared/util/SpaceCodeHelper.java  |  8 +--
 .../plugin/generic/server/GenericServer.java  |  2 +-
 .../QueryDatabaseDefinitionProvider.java      |  6 +-
 .../query/shared/DatabaseDefinition.java      |  8 +--
 .../authorization/AuthorizationChecker.java   |  6 +-
 .../authorization/IAuthorizationChecker.java  |  4 +-
 .../authorization/QueryAccessController.java  | 12 ++--
 .../result_filter/DataSetGroupLoader.java     |  8 +--
 .../result_filter/ExperimentGroupLoader.java  |  8 +--
 .../result_filter/IGroupLoader.java           |  4 +-
 .../result_filter/QueryResultFilter.java      |  6 +-
 .../result_filter/SampleGroupLoader.java      |  8 +--
 openbis/source/java/hibernateContext.xml      |  2 +-
 .../generic/server/CommonServerTest.java      | 22 +++---
 .../generic/server/ETLServiceTest.java        |  2 +-
 .../api/v1/GeneralInformationServiceTest.java | 24 +++----
 .../authorization/AuthorizationTestUtil.java  | 34 ++++-----
 .../DefaultAccessControllerTest.java          |  6 +-
 .../server/business/ManagerTestTool.java      | 40 +++++------
 .../server/business/bo/AbstractBOTest.java    |  8 +--
 .../server/business/bo/ExperimentBOTest.java  | 24 +++----
 .../business/bo/ExternalDataBOTest.java       | 10 +--
 .../business/bo/ExternalDataTableTest.java    |  6 +-
 .../server/business/bo/GroupBOTest.java       |  6 +-
 .../server/business/bo/ProjectBOTest.java     |  2 +-
 .../business/bo/RoleAssignmentTableTest.java  |  6 +-
 .../server/business/bo/SampleBOTest.java      | 70 +++++++++----------
 .../bo/SampleGenericBusinessRulesTest.java    | 10 +--
 .../SecondaryEntityListingQueryTest.java      |  2 +-
 .../DatasetListingQueryTest.java              |  8 +--
 .../samplelister/SampleListingQueryTest.java  | 14 ++--
 .../db/AbstractDAOWithoutContextTest.java     | 20 +++---
 .../server/dataaccess/db/GroupDAOTest.java    | 42 +++++------
 .../server/dataaccess/db/MaterialDAOTest.java |  2 +-
 .../server/dataaccess/db/ProjectDAOTest.java  | 42 +++++------
 .../dataaccess/db/RoleAssignmentDAOTest.java  | 10 +--
 .../server/dataaccess/db/SampleDAOTest.java   | 45 ++++++------
 .../server/dataaccess/db/ScriptDAOTest.java   |  4 +-
 .../dataaccess/db/SqlUnitMigrationTest.java   |  1 +
 .../dataaccess/db/scalability/DBCreator.java  | 12 ++--
 .../shared/AbstractServerTestCase.java        | 18 ++---
 .../generic/shared/CommonTestUtils.java       | 10 +--
 .../authorization/AuthorizationTestCase.java  | 36 +++++-----
 .../authorization/RoleWithIdentifierTest.java |  8 +--
 .../AbstractTechIdPredicateTest.java          | 12 ++--
 .../ListSampleCriteriaPredicateTest.java      |  4 +-
 .../predicate/NewSamplePredicateTest.java     |  4 +-
 .../SpaceIdentifierPredicateTest.java         | 12 ++--
 .../validator/ExperimentValidatorTest.java    |  4 +-
 .../validator/ExternalDataValidatorTest.java  |  6 +-
 .../validator/GroupValidatorTest.java         |  8 +--
 .../MatchingEntityValidatorTest.java          | 12 ++--
 .../validator/ProjectValidatorTest.java       |  4 +-
 .../validator/SampleValidatorTest.java        |  4 +-
 .../ExternalDataTranslatorTest.java           | 10 +--
 .../QueryAccessControllerTest.java            | 10 +--
 .../result_filter/DataSetGroupLoaderTest.java | 10 +--
 .../ExperimentGroupLoaderTest.java            | 10 +--
 .../result_filter/QueryResultFilterTest.java  | 12 ++--
 .../result_filter/SampleGroupLoaderTest.java  | 10 +--
 .../systemtest/AuthenticationSystemTest.java  |  2 +-
 .../server/business/SampleLoader.java         |  6 +-
 .../ProteomicsDataServiceInternalTest.java    | 14 ++--
 .../validator/RawDataSampleValidatorTest.java |  6 +-
 .../server/dataaccess/IScreeningQuery.java    | 12 ++--
 .../server/logic/ScreeningApiImpl.java        |  2 +-
 .../ExperimentIdentifierPredicate.java        |  4 +-
 ...ateWellReferenceWithDatasetsValidator.java |  4 +-
 .../ScreeningExperimentValidator.java         |  4 +-
 .../ScreeningPlateListReadOnlyPredicate.java  |  4 +-
 .../ScreeningPlateValidator.java              |  4 +-
 .../authorization/WellContentValidator.java   |  4 +-
 144 files changed, 790 insertions(+), 793 deletions(-)
 rename openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/{IGroupDAO.java => ISpaceDAO.java} (60%)
 rename openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/{GroupDAO.java => SpaceDAO.java} (71%)
 rename openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/{GroupPE.java => SpacePE.java} (91%)

diff --git a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
index 398193702ac..c5ce5b43d1a 100644
--- a/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
+++ b/datastore_server/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/UploadingCommandTest.java
@@ -59,7 +59,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EntityPropertyPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.ExperimentTranslator;
@@ -218,13 +218,13 @@ public class UploadingCommandTest extends AssertJUnit
         experiment.setRegistrator(person);
         ProjectPE project = new ProjectPE();
         project.setCode("p1");
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setCode("g1");
         DatabaseInstancePE instance = new DatabaseInstancePE();
         instance.setCode("instance");
         instance.setOriginalSource(true);
         group.setDatabaseInstance(instance);
-        project.setGroup(group);
+        project.setSpace(group);
         experiment.setProject(project);
         LinkedHashSet<EntityPropertyPE> properties = new LinkedHashSet<EntityPropertyPE>();
         experiment.setProperties(properties);
diff --git a/dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/DumpPreparator.java b/dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/DumpPreparator.java
index 5a5138e609f..7202ab36095 100644
--- a/dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/DumpPreparator.java
+++ b/dbmigration/source/java/ch/systemsx/cisd/dbmigration/postgresql/DumpPreparator.java
@@ -59,6 +59,7 @@ import ch.systemsx.cisd.dbmigration.SimpleTableMetaData;
 public class DumpPreparator
 {
     private static final String MAC_POSTGRESQL_PATH = "/opt/local/lib/postgresql84/bin/";
+    private static final String MAC_POSTGRESQL_9_PATH = "/opt/local/lib/postgresql90/bin/";
 
     private static final String DUMP_EXEC = "pg_dump";
     
@@ -152,6 +153,7 @@ public class DumpPreparator
     private static String getExecutable(String executable)
     {
         final Set<String> paths = OSUtilities.getSafeOSPath();
+        paths.add(MAC_POSTGRESQL_9_PATH);
         paths.add(MAC_POSTGRESQL_PATH);
         final File dumbExec = OSUtilities.findExecutable(executable, paths);
         if (dumbExec == null)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java
index 16a65d16c27..12d0eec08d7 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/AbstractServer.java
@@ -45,7 +45,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleC
 import ch.systemsx.cisd.openbis.generic.shared.dto.DataSetTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DataStorePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomColumnPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IAuthSession;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -288,7 +288,7 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp
         PersonPE person = session.tryGetPerson();
         assert person != null : "cannot obtain the person which is logged in";
         result.setDisplaySettings(person.getDisplaySettings());
-        GroupPE homeGroup = person.getHomeGroup();
+        SpacePE homeGroup = person.getHomeSpace();
         result.setHomeGroupCode(homeGroup == null ? null : homeGroup.getCode());
         result.setSessionExpirationTime(session.getSessionExpirationTime());
         result.setSessionToken(session.getSessionToken());
@@ -357,10 +357,10 @@ public abstract class AbstractServer<T> extends AbstractServiceWithLogger<T> imp
         PersonPE person = session.tryGetPerson();
         if (person != null)
         {
-            GroupPE homeGroup =
-                    groupIdOrNull == null ? null : getDAOFactory().getGroupDAO().getByTechId(
+            SpacePE homeGroup =
+                    groupIdOrNull == null ? null : getDAOFactory().getSpaceDAO().getByTechId(
                             groupIdOrNull);
-            person.setHomeGroup(homeGroup);
+            person.setHomeSpace(homeGroup);
             // don't need to updatePerson(person) with DAO because it is attached to a session
         }
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java
index 321c1daebd5..a0b051b6b7c 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/CommonServer.java
@@ -157,7 +157,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomFilterPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IEntityInformationHolderDTO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IEntityInformationWithPropertiesHolder;
 import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialTypePE;
@@ -275,9 +275,9 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt
         final Session session = getSession(sessionToken);
         final DatabaseInstancePE databaseInstance =
                 GroupIdentifierHelper.getDatabaseInstance(identifier, getDAOFactory());
-        final List<GroupPE> groups = getDAOFactory().getGroupDAO().listGroups(databaseInstance);
-        final GroupPE homeGroupOrNull = session.tryGetHomeGroup();
-        for (final GroupPE group : groups)
+        final List<SpacePE> groups = getDAOFactory().getSpaceDAO().listSpaces(databaseInstance);
+        final SpacePE homeGroupOrNull = session.tryGetHomeGroup();
+        for (final SpacePE group : groups)
         {
             group.setHome(group.equals(homeGroupOrNull));
         }
@@ -366,7 +366,7 @@ public final class CommonServer extends AbstractCommonServer<ICommonServerForInt
         final Session session = getSession(sessionToken);
 
         final RoleAssignmentPE roleAssignment =
-                getDAOFactory().getRoleAssignmentDAO().tryFindGroupRoleAssignment(roleCode,
+                getDAOFactory().getRoleAssignmentDAO().tryFindSpaceRoleAssignment(roleCode,
                         spaceIdentifier.getSpaceCode(), grantee);
         if (roleAssignment == null)
         {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java
index 322059c720a..770e9bd26ef 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationService.java
@@ -51,7 +51,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.dto.AuthorizationGroupPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -118,10 +118,10 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
 
         Map<String, List<RoleAssignmentPE>> roleAssignmentsPerSpace = getRoleAssignmentsPerSpace();
         List<RoleAssignmentPE> instanceRoleAssignments = roleAssignmentsPerSpace.get(null);
-        List<GroupPE> spaces = listSpaces(databaseInstanceCodeOrNull);
+        List<SpacePE> spaces = listSpaces(databaseInstanceCodeOrNull);
         List<SpaceWithProjectsAndRoleAssignments> result =
                 new ArrayList<SpaceWithProjectsAndRoleAssignments>();
-        for (GroupPE space : spaces)
+        for (SpacePE space : spaces)
         {
             SpaceWithProjectsAndRoleAssignments fullSpace =
                     new SpaceWithProjectsAndRoleAssignments(space.getCode());
@@ -155,7 +155,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
                 new HashMap<String, List<RoleAssignmentPE>>();
         for (RoleAssignmentPE roleAssignment : roleAssignments)
         {
-            GroupPE space = roleAssignment.getGroup();
+            SpacePE space = roleAssignment.getSpace();
             String spaceCode = space == null ? null : space.getCode();
             List<RoleAssignmentPE> list = roleAssignmentsPerSpace.get(spaceCode);
             if (list == null)
@@ -168,7 +168,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
         return roleAssignmentsPerSpace;
     }
 
-    private List<GroupPE> listSpaces(String databaseInstanceCodeOrNull)
+    private List<SpacePE> listSpaces(String databaseInstanceCodeOrNull)
     {
         IDAOFactory daoFactory = getDAOFactory();
         DatabaseInstancePE databaseInstance = daoFactory.getHomeDatabaseInstance();
@@ -178,10 +178,10 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
             databaseInstance =
                     databaseInstanceDAO.tryFindDatabaseInstanceByCode(databaseInstanceCodeOrNull);
         }
-        return daoFactory.getGroupDAO().listGroups(databaseInstance);
+        return daoFactory.getSpaceDAO().listSpaces(databaseInstance);
     }
 
-    private void addProjectsTo(SpaceWithProjectsAndRoleAssignments fullSpace, GroupPE space)
+    private void addProjectsTo(SpaceWithProjectsAndRoleAssignments fullSpace, SpacePE space)
     {
         List<ProjectPE> projects = getDAOFactory().getProjectDAO().listProjects(space);
         for (ProjectPE project : projects)
@@ -196,7 +196,7 @@ public class GeneralInformationService extends AbstractServer<IGeneralInformatio
         {
             Role role =
                     Translator.translate(roleAssignment.getRole(),
-                            roleAssignment.getGroup() != null);
+                            roleAssignment.getSpace() != null);
             Set<PersonPE> persons;
             AuthorizationGroupPE authorizationGroup = roleAssignment.getAuthorizationGroup();
             if (authorizationGroup != null)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateExecutor.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateExecutor.java
index 0489e247085..fc8c539d598 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateExecutor.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/authorization/PredicateExecutor.java
@@ -47,7 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomColumnPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomFilterPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.QueryPE;
@@ -229,14 +229,14 @@ public final class PredicateExecutor
             }
         }
 
-        public List<GroupPE> listGroups()
+        public List<SpacePE> listGroups()
         {
-            return daoFactory.getGroupDAO().listGroups();
+            return daoFactory.getSpaceDAO().listSpaces();
         }
 
-        public GroupPE tryGetSpace(DatabaseInstancePE databaseInstance, String spaceCode)
+        public SpacePE tryGetSpace(DatabaseInstancePE databaseInstance, String spaceCode)
         {
-            return daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(spaceCode,
+            return daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(spaceCode,
                     homeDatabaseInstance);
         }
 
@@ -374,22 +374,22 @@ public final class PredicateExecutor
             return fullResults;
         }
 
-        public GroupPE tryToGetGroup(SpaceOwnerKind kind, TechId techId)
+        public SpacePE tryToGetGroup(SpaceOwnerKind kind, TechId techId)
         {
             switch (kind)
             {
                 case DATASET:
                     ExternalDataPE dataset = daoFactory.getExternalDataDAO().getByTechId(techId);
-                    return dataset.getExperiment().getProject().getGroup();
+                    return dataset.getExperiment().getProject().getSpace();
                 case EXPERIMENT:
                     ExperimentPE experiment = daoFactory.getExperimentDAO().getByTechId(techId);
-                    return experiment.getProject().getGroup();
+                    return experiment.getProject().getSpace();
                 case SPACE:
-                    GroupPE group = daoFactory.getGroupDAO().getByTechId(techId);
+                    SpacePE group = daoFactory.getSpaceDAO().getByTechId(techId);
                     return group;
                 case PROJECT:
                     ProjectPE project = daoFactory.getProjectDAO().getByTechId(techId);
-                    return project.getGroup();
+                    return project.getSpace();
             }
             return null;
         }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java
index cb6705cad58..51bb45887db 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBusinessObject.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IFileFormatTypeDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGridCustomColumnDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGridCustomFilterDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IHibernateSearchDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.ILocatorTypeDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IMaterialDAO;
@@ -56,7 +56,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.IPermIdDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.search.IFullTextIndexUpdateScheduler;
 import ch.systemsx.cisd.openbis.generic.server.util.GroupIdentifierHelper;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier;
@@ -98,7 +98,7 @@ abstract class AbstractBusinessObject implements IDAOFactory
     {
         if (org.apache.commons.lang.StringUtils.isBlank(spaceIdentifier.getSpaceCode()))
         {
-            final GroupPE group =
+            final SpacePE group =
                     GroupIdentifierHelper.tryGetGroup(spaceIdentifier, findRegistrator(), this);
             checkNotNull(spaceIdentifier, group);
             spaceIdentifier.setDatabaseInstanceCode(group.getDatabaseInstance().getCode());
@@ -106,7 +106,7 @@ abstract class AbstractBusinessObject implements IDAOFactory
         }
     }
 
-    private static void checkNotNull(final SpaceIdentifier spaceIdentifier, final GroupPE group)
+    private static void checkNotNull(final SpaceIdentifier spaceIdentifier, final SpacePE group)
     {
         if (group == null)
         {
@@ -160,9 +160,9 @@ abstract class AbstractBusinessObject implements IDAOFactory
         return daoFactory.getHomeDatabaseInstance();
     }
 
-    public final IGroupDAO getGroupDAO()
+    public final ISpaceDAO getSpaceDAO()
     {
-        return daoFactory.getGroupDAO();
+        return daoFactory.getSpaceDAO();
     }
 
     public final IScriptDAO getScriptDAO()
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleBusinessObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleBusinessObject.java
index 6782ed2b31e..a08a0191196 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleBusinessObject.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleBusinessObject.java
@@ -39,7 +39,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePropertyTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RelationshipTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -132,7 +132,7 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
         samplePE.setCode(sampleIdentifier.getSampleSubCode());
         samplePE.setRegistrator(findRegistrator());
         samplePE.setSampleType(sampleTypePE);
-        samplePE.setGroup(sampleOwner.tryGetGroup());
+        samplePE.setSpace(sampleOwner.tryGetSpace());
         samplePE.setDatabaseInstance(sampleOwner.tryGetDatabaseInstance());
         defineSampleProperties(samplePE, newSample.getProperties());
         String containerIdentifier = newSample.getContainerIdentifier();
@@ -378,15 +378,15 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
                             + "because there are already datasets attached to the sample.",
                     sample.getIdentifier());
         }
-        if (hasDatasets && sample.getGroup() == null)
+        if (hasDatasets && sample.getSpace() == null)
         {
             throw UserFailureException.fromTemplate("Cannot detach the sample '%s' from the space "
                     + "because there are already datasets attached to the sample.",
                     sample.getIdentifier());
         }
         if (sample.getExperiment() != null
-                && (sample.getGroup() == null || sample.getExperiment().getProject().getGroup()
-                        .equals(sample.getGroup()) == false))
+                && (sample.getSpace() == null || sample.getExperiment().getProject().getSpace()
+                        .equals(sample.getSpace()) == false))
         {
             throw new UserFailureException(
                     "Sample space must be the same as experiment space. Shared samples cannot be attached to experiments.");
@@ -419,9 +419,9 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
         {
             final SampleOwner sampleOwner =
                     getSampleOwner(sampleOwnerCacheOrNull, sampleOwnerIdentifier);
-            GroupPE group = sampleOwner.tryGetGroup();
+            SpacePE group = sampleOwner.tryGetSpace();
             sample.setDatabaseInstance(sampleOwner.tryGetDatabaseInstance());
-            sample.setGroup(group);
+            sample.setSpace(group);
         }
     }
 
@@ -475,7 +475,7 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
 
     private void ensureSampleAttachableToExperiment(SamplePE sample)
     {
-        if (sample.getGroup() == null)
+        if (sample.getSpace() == null)
         {
             throw UserFailureException.fromTemplate(
                     "It is not allowed to connect a shared sample '%s' to the experiment.",
@@ -610,10 +610,10 @@ abstract class AbstractSampleBusinessObject extends AbstractSampleIdentifierBusi
                                 sampleOwner.tryGetDatabaseInstance());
             } else
             {
-                assert sampleOwner.isGroupLevel() : "Must be of space level.";
+                assert sampleOwner.isSpaceLevel() : "Must be of space level.";
                 samples =
-                        sampleDAO.listByCodesAndGroup(sampleCodes, containerCodeOrNull,
-                                sampleOwner.tryGetGroup());
+                        sampleDAO.listByCodesAndSpace(sampleCodes, containerCodeOrNull,
+                                sampleOwner.tryGetSpace());
             }
             results.addAll(samples);
         }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleIdentifierBusinessObject.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleIdentifierBusinessObject.java
index bc2e7eb3f84..4323ba12ee5 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleIdentifierBusinessObject.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractSampleIdentifierBusinessObject.java
@@ -95,8 +95,8 @@ abstract class AbstractSampleIdentifierBusinessObject extends AbstractBusinessOb
                                 sampleOwner.tryGetDatabaseInstance());
             } else
             {
-                assert sampleOwner.isGroupLevel() : "Must be of space level.";
-                result = sampleDAO.tryFindByCodeAndGroup(sampleCode, sampleOwner.tryGetGroup());
+                assert sampleOwner.isSpaceLevel() : "Must be of space level.";
+                result = sampleDAO.tryFindByCodeAndSpace(sampleCode, sampleOwner.tryGetSpace());
             }
             if (result != null)
             {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java
index c1cc3eb88b4..34283cb9dd3 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBO.java
@@ -47,7 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPropertyPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePropertyTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentUpdatesDTO;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -447,7 +447,7 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper
 
     private List<SamplePE> findUnassignedSamplesByCodes(Set<String> codesToAdd)
     {
-        GroupPE group = experiment.getProject().getGroup();
+        SpacePE group = experiment.getProject().getSpace();
         return findUnassignedSamples(getSampleDAO(), codesToAdd, group);
     }
 
@@ -484,13 +484,13 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper
     // Finds samples in the specified group. Throws exception if some samples do not exist.
     // Throws exception if any sample code specified is already assigned to an experiment.
     private static List<SamplePE> findUnassignedSamples(ISampleDAO sampleDAO,
-            Set<String> sampleCodes, GroupPE group) throws UserFailureException
+            Set<String> sampleCodes, SpacePE group) throws UserFailureException
     {
         List<SamplePE> samples = new ArrayList<SamplePE>();
         List<String> missingSamples = new ArrayList<String>();
         for (String code : sampleCodes)
         {
-            SamplePE sample = sampleDAO.tryFindByCodeAndGroup(code, group);
+            SamplePE sample = sampleDAO.tryFindByCodeAndSpace(code, group);
             if (sample == null)
             {
                 missingSamples.add(code);
@@ -536,9 +536,9 @@ public final class ExperimentBO extends AbstractBusinessObject implements IExper
             return; // nothing to change
         }
         // if the group has changes, move all samples to that group
-        if (project.getGroup().equals(previousProject.getGroup()) == false)
+        if (project.getSpace().equals(previousProject.getSpace()) == false)
         {
-            SampleUtils.setSamplesGroup(experiment, project.getGroup());
+            SampleUtils.setSamplesGroup(experiment, project.getSpace());
         }
         experiment.setProject(project);
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBO.java
index dc1cf1e6b3a..4587e6af88f 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBO.java
@@ -586,7 +586,7 @@ public class ExternalDataBO extends AbstractExternalDataBusinessObject implement
         {
             return; // nothing to change
         }
-        if (newSample.getGroup() == null)
+        if (newSample.getSpace() == null)
         {
             throw createWrongSampleException(newSample, "the new sample is shared");
         }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTable.java
index 4e5d58e35a1..7864c7ecd17 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTable.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTable.java
@@ -63,7 +63,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE.EntityType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -289,7 +289,7 @@ public final class ExternalDataTable extends AbstractExternalDataBusinessObject
                 {
                     experiment = dataSet.getExperiment();
                 }
-                HibernateUtils.initialize(experiment.getProject().getGroup());
+                HibernateUtils.initialize(experiment.getProject().getSpace());
                 HibernateUtils.initialize(experiment.getProperties());
             }
             if (StringUtils.isBlank(dataStore.getRemoteUrl()))
@@ -497,7 +497,7 @@ public final class ExternalDataTable extends AbstractExternalDataBusinessObject
         description.setExperimentCode(experiment.getCode());
         ProjectPE project = experiment.getProject();
         description.setProjectCode(project.getCode());
-        GroupPE group = project.getGroup();
+        SpacePE group = project.getSpace();
         description.setGroupCode(group.getCode());
         description.setDatabaseInstanceCode(group.getDatabaseInstance().getCode());
         DataSetTypePE dataSetType = dataSet.getDataSetType();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java
index 11ff7d9f121..cb7a31a3254 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBO.java
@@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ISpaceUpdates;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventType;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE.EntityType;
@@ -44,7 +44,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.IdentifierHelper;
 public final class GroupBO extends AbstractBusinessObject implements IGroupBO
 {
 
-    private GroupPE group;
+    private SpacePE group;
 
     public GroupBO(final IDAOFactory daoFactory, final Session session)
     {
@@ -65,7 +65,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
                 throw new UserFailureException("Registration of space " + group
                         + " on a non-home database is not allowed.");
             }
-            getGroupDAO().createGroup(group);
+            getSpaceDAO().createSpace(group);
         } catch (final DataAccessException e)
         {
             throwException(e, "Space '" + IdentifierHelper.createGroupIdentifier(group) + "'");
@@ -83,14 +83,14 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
 
     private void validateAndSave()
     {
-        getGroupDAO().validateAndSaveUpdatedEntity(group);
+        getSpaceDAO().validateAndSaveUpdatedEntity(group);
     }
 
     public final void define(String groupCode, final String descriptionOrNull)
             throws UserFailureException
     {
         assert groupCode != null : "Unspecified space code.";
-        group = new GroupPE();
+        group = new SpacePE();
         final GroupIdentifier groupIdentifier =
                 new GroupIdentifier(DatabaseInstanceIdentifier.HOME, groupCode);
         final DatabaseInstancePE databaseInstance =
@@ -101,7 +101,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
         group.setRegistrator(findRegistrator());
     }
 
-    public GroupPE getGroup() throws UserFailureException
+    public SpacePE getGroup() throws UserFailureException
     {
         return group;
     }
@@ -120,7 +120,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
     {
         try
         {
-            group = getGroupDAO().getByTechId(groupId);
+            group = getSpaceDAO().getByTechId(groupId);
         } catch (DataRetrievalFailureException exception)
         {
             throw new UserFailureException(exception.getMessage());
@@ -132,7 +132,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
         loadDataByTechId(groupId);
         try
         {
-            getGroupDAO().delete(group);
+            getSpaceDAO().delete(group);
             getEventDAO().persist(createDeletionEvent(group, session.tryGetPerson(), reason));
         } catch (final DataAccessException ex)
         {
@@ -140,11 +140,11 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
         }
     }
 
-    public static EventPE createDeletionEvent(GroupPE group, PersonPE registrator, String reason)
+    public static EventPE createDeletionEvent(SpacePE group, PersonPE registrator, String reason)
     {
         EventPE event = new EventPE();
         event.setEventType(EventType.DELETION);
-        event.setEntityType(EntityType.GROUP);
+        event.setEntityType(EntityType.SPACE);
         event.setIdentifier(group.getCode());
         event.setDescription(getDeletionDescription(group));
         event.setReason(reason);
@@ -153,7 +153,7 @@ public final class GroupBO extends AbstractBusinessObject implements IGroupBO
         return event;
     }
 
-    private static String getDeletionDescription(GroupPE group)
+    private static String getDeletionDescription(SpacePE group)
     {
         return String.format("%s", group.getCode());
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IGroupBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IGroupBO.java
index e666296fdf8..2e828405cd5 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IGroupBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/IGroupBO.java
@@ -19,11 +19,11 @@ package ch.systemsx.cisd.openbis.generic.server.business.bo;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ISpaceUpdates;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
 
 /**
- * Business object of a group. Holds an instance of {@link GroupPE}.
+ * Business object of a group. Holds an instance of {@link SpacePE}.
  * 
  * @author Christian Ribeaud
  */
@@ -50,7 +50,7 @@ public interface IGroupBO extends IEntityBusinessObject
     /**
      * Returns the group or null.
      */
-    public GroupPE getGroup() throws UserFailureException;
+    public SpacePE getGroup() throws UserFailureException;
 
     /**
      * Updates the group.
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java
index 472dad91ffc..5b765bf8983 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBO.java
@@ -34,7 +34,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.AttachmentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectUpdatesDTO;
@@ -74,9 +74,9 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB
             String leaderId)
     {
         final ProjectPE result = new ProjectPE();
-        final GroupPE group =
+        final SpacePE group =
                 GroupIdentifierHelper.tryGetGroup(projectIdentifier, session.tryGetPerson(), this);
-        result.setGroup(group);
+        result.setSpace(group);
         result.setRegistrator(findRegistrator());
         result.setCode(projectIdentifier.getProjectCode());
         result.setDescription(description);
@@ -226,7 +226,7 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB
             addAttachment(AttachmentTranslator.translate(attachment));
         }
         String groupCode = updates.getGroupCode();
-        if (groupCode != null && groupCode.equals(project.getGroup().getCode()) == false)
+        if (groupCode != null && groupCode.equals(project.getSpace().getCode()) == false)
         {
             updateGroup(groupCode);
         }
@@ -235,19 +235,19 @@ public final class ProjectBO extends AbstractBusinessObject implements IProjectB
 
     private void updateGroup(String groupCode)
     {
-        GroupPE group = findGroup(groupCode);
-        project.setGroup(group);
+        SpacePE group = findGroup(groupCode);
+        project.setSpace(group);
         for (ExperimentPE experiment : project.getExperiments())
         {
             SampleUtils.setSamplesGroup(experiment, group);
         }
     }
 
-    private GroupPE findGroup(String groupCode)
+    private SpacePE findGroup(String groupCode)
     {
-        GroupPE group =
-                getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(groupCode,
-                        project.getGroup().getDatabaseInstance());
+        SpacePE group =
+                getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(groupCode,
+                        project.getSpace().getDatabaseInstance());
         if (group == null)
         {
             throw UserFailureException
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java
index 44d8d2b426e..456fbb8f403 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTable.java
@@ -29,7 +29,7 @@ import ch.systemsx.cisd.openbis.generic.server.util.KeyExtractorFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Grantee;
 import ch.systemsx.cisd.openbis.generic.shared.dto.AuthorizationGroupPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.NewRoleAssignment;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -112,7 +112,7 @@ public final class RoleAssignmentTable extends AbstractBusinessObject implements
         } else
         {
             final SpaceIdentifier groupIdentifier = newRoleAssignment.getSpaceIdentifier();
-            final GroupPE group =
+            final SpacePE group =
                     GroupIdentifierHelper
                             .tryGetGroup(groupIdentifier, session.tryGetPerson(), this);
             if (group == null)
@@ -120,7 +120,7 @@ public final class RoleAssignmentTable extends AbstractBusinessObject implements
                 throw UserFailureException.fromTemplate("Specified space '%s' could not be found",
                         groupIdentifier);
             }
-            roleAssignment.setGroup(group);
+            roleAssignment.setSpace(group);
         }
         roleAssignment.setRegistrator(findRegistrator());
         roleAssignment.setRole(newRoleAssignment.getRole());
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java
index 28d104462de..1093432bd17 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java
@@ -222,7 +222,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam
 
     private final static void checkSampleInGroup(final SamplePE sample)
     {
-        if (sample.getGroup() == null)
+        if (sample.getSpace() == null)
         {
             throw UserFailureException.fromTemplate(
                     "The sample '%s' is shared and cannot be assigned to any experiment.",
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java
index 39d859766e5..aaf147b7582 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleTable.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePropertyTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ListSamplesByPropertyCriteria;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
@@ -74,9 +74,9 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I
     public final void loadSamplesByCriteria(final ListSamplesByPropertyCriteria criteria)
     {
         onlyNewSamples = false;
-        GroupPE group = findGroup(criteria.getSpaceCode());
+        SpacePE group = findGroup(criteria.getSpaceCode());
         List<SamplePE> foundSamples =
-                getSampleDAO().listSamplesByGroupAndProperty(criteria.getPropertyCode(),
+                getSampleDAO().listSamplesBySpaceAndProperty(criteria.getPropertyCode(),
                         criteria.getPropertyValue(), group);
         LocalExperimentIdentifier localExperimentIdentifier =
                 criteria.tryGetLocalExperimentIdentifier();
@@ -120,7 +120,7 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I
                     .fromTemplate(
                             "It was expected that there is exactly one experiment "
                                     + "in the '%s/%s' project with property '%s' set to '%s', but %d were found!",
-                            project.getGroup().getCode(), project.getCode(), propertyCode,
+                            project.getSpace().getCode(), project.getCode(), propertyCode,
                             propertyValue, experiments.size());
         }
         return experiments.get(0);
@@ -147,10 +147,10 @@ public final class SampleTable extends AbstractSampleBusinessObject implements I
         return filteredSamples;
     }
 
-    private GroupPE findGroup(String groupCode)
+    private SpacePE findGroup(String groupCode)
     {
-        GroupPE group =
-                getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(groupCode,
+        SpacePE group =
+                getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(groupCode,
                         getHomeDatabaseInstance());
         if (group == null)
         {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SimpleDataSetHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SimpleDataSetHelper.java
index 3e097579e7a..304c499a43d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SimpleDataSetHelper.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SimpleDataSetHelper.java
@@ -52,11 +52,11 @@ public class SimpleDataSetHelper
         SimpleDataSetInformationDTO result = new SimpleDataSetInformationDTO();
         result.setDataSetCode(data.getCode());
         result.setDataSetLocation(data.getLocation());
-        result.setDatabaseInstanceCode(data.getExperiment().getProject().getGroup()
+        result.setDatabaseInstanceCode(data.getExperiment().getProject().getSpace()
                 .getDatabaseInstance().getCode());
         result.setExperimentCode(data.getExperiment().getCode());
         result.setProjectCode(data.getExperiment().getProject().getCode());
-        result.setGroupCode(data.getExperiment().getProject().getGroup().getCode());
+        result.setGroupCode(data.getExperiment().getProject().getSpace().getCode());
         SamplePE sampleOrNull = data.tryGetSample();
         result.setSampleCode(sampleOrNull == null ? null : sampleOrNull.getCode());
         result.setDataSetType(data.getDataSetType().getCode());
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/ISecondaryEntityListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/ISecondaryEntityListingQuery.java
index 48b4268a5cc..a0cd07de98f 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/ISecondaryEntityListingQuery.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/ISecondaryEntityListingQuery.java
@@ -49,9 +49,10 @@ public interface ISecondaryEntityListingQuery extends TransactionQuery
      * 
      * @param experimentId The id of the experiment to get the code for.
      */
-    @Select("select e.code as e_code, e.perm_id as e_permid, et.code as et_code, p.code as p_code, p.id as p_id, g.code as g_code, g.dbin_id as dbin_id from experiments e "
+    @Select("select e.code as e_code, e.perm_id as e_permid, et.code as et_code, "
+            + "p.code as p_code, p.id as p_id, g.code as g_code, g.dbin_id as dbin_id from experiments e "
             + "join experiment_types et on e.exty_id=et.id join projects p on e.proj_id=p.id "
-            + "join groups g on p.grou_id=g.id where e.id=?{1}")
+            + "join spaces g on p.space_id=g.id where e.id=?{1}")
     public ExperimentProjectGroupCodeRecord getExperimentAndProjectAndGroupCodeForId(
             long experimentId);
 
@@ -65,7 +66,7 @@ public interface ISecondaryEntityListingQuery extends TransactionQuery
     @Select(sql = "select s.id as id, s.perm_id as perm_id, s.code as s_code, s.inva_id as inva_id, "
             + "           st.code as st_code, g.code as g_code, c.code as c_code"
             + "   from samples s join sample_types st on s.saty_id=st.id"
-            + "                  join groups g on s.grou_id=g.id "
+            + "                  join spaces g on s.space_id=g.id "
             + "                  left join samples c on s.samp_id_part_of=c.id "
             + "        where s.id = any(?{1})", parameterBindings =
         { LongSetMapper.class }, fetchSize = FETCH_SIZE)
@@ -92,18 +93,18 @@ public interface ISecondaryEntityListingQuery extends TransactionQuery
     public Person getPersonById(long personId);
 
     /**
-     * Returns all groups of this data base instance.
+     * Returns all spaces of this data base instance.
      * 
-     * @param databaseInstanceId The id of the ddatabase to get the groups for.
+     * @param databaseInstanceId The id of the database to get the spaces for.
      */
-    @Select("select id, code from groups where dbin_id=?{1}")
-    public Space[] getAllGroups(long databaseInstanceId);
+    @Select("select id, code from spaces where dbin_id=?{1}")
+    public Space[] getAllSpaces(long databaseInstanceId);
 
     /**
-     * Returns the technical id of a group for given <var>groupCode</code>.
+     * Returns the technical id of a group for given <var>spaceCode</code>.
      */
-    @Select("select id from groups where code=?{1}")
-    public long getGroupIdForCode(String groupCode);
+    @Select("select id from spaces where code=?{1}")
+    public long getGroupIdForCode(String spaceCode);
 
     /**
      * Returns the technical id of a sample type for given <var>sampleTypeCode</code> or
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java
index 34e1970191b..c2666f83aec 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityDAO.java
@@ -155,7 +155,7 @@ public class SecondaryEntityDAO
 
     public Space[] getAllSpaces(long databaseInstanceId)
     {
-        return query.getAllGroups(databaseInstanceId);
+        return query.getAllSpaces(databaseInstanceId);
     }
 
     public long getGroupIdForCode(String groupCode)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java
index 2ca31211c55..24e112f632e 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/ISampleListingQuery.java
@@ -57,7 +57,7 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
     public static final int FETCH_SIZE = 1000;
 
     static final String SELECT_FROM_SAMPLES_S =
-            "           SELECT s.id, s.perm_id, s.code, s.expe_id, s.grou_id, s.saty_id, s.dbin_id, "
+            "           SELECT s.id, s.perm_id, s.code, s.expe_id, s.space_id, s.saty_id, s.dbin_id, "
                     + "   s.registration_timestamp, s.modification_timestamp, s.pers_id_registerer, "
                     + "   s.inva_id, s.samp_id_part_of                                              "
                     + " FROM samples s";
@@ -65,7 +65,7 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
     /**
      * Returns the total number of all samples in the database.
      */
-    @Select(sql = "select count(*) from samples s left join groups g on s.grou_id=g.id where s.dbin_id=?{1} or g.dbin_id=?{1}")
+    @Select(sql = "select count(*) from samples s left join spaces g on s.space_id=g.id where s.dbin_id=?{1} or g.dbin_id=?{1}")
     public long getSampleCount(long dbInstanceId);
 
     // relationships
@@ -101,7 +101,7 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
     public DataIterator<SampleRelationRecord> getParentRelations(long relationshipId,
             LongSet childrenSampleIds);
 
-    @Select(sql = "select id, saty_id, grou_id, dbin_id, expe_id from samples", fetchSize = FETCH_SIZE)
+    @Select(sql = "select id, saty_id, space_id, dbin_id, expe_id from samples", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getSampleSkeletons();
 
     @Select(sql = "select * from sample_relationships", fetchSize = FETCH_SIZE)
@@ -118,7 +118,7 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
     /**
      * Returns all samples in the database.
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " left join groups g on s.grou_id=g.id"
+    @Select(sql = SELECT_FROM_SAMPLES_S + " left join spaces g on s.space_id=g.id"
             + " where s.dbin_id=?{1} or g.dbin_id=?{1}", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getSamples(long dbInstanceId);
 
@@ -130,14 +130,14 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
      * Returns the samples for the given <var>groupCode</var>.
      */
     @Select(sql = SELECT_FROM_SAMPLES_S + " join sample_types st on s.saty_id=st.id"
-            + " join groups g on s.grou_id=g.id "
+            + " join spaces g on s.space_id=g.id "
             + " where st.is_listable and g.dbin_id=?{1} and g.code=?{2} order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getListableGroupSamples(long dbInstanceId, String groupCode);
 
     /**
      * Returns the samples for the given <var>groupCode</var> that are assigned to an experiment.
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where s.expe_id is not null and g.dbin_id=?{1} and g.code=?{2} "
             + " order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getGroupSamplesWithExperiment(long dbInstanceId,
@@ -146,7 +146,7 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
     /**
      * Returns the samples for the given <var>groupCode</var> and <var>sampleTypeId</var>
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where g.dbin_id=?{1} and g.code=?{2} and s.saty_id=?{3}       "
             + " order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getGroupSamplesForSampleType(long dbInstanceId,
@@ -156,42 +156,42 @@ public interface ISampleListingQuery extends TransactionQuery, IPropertyListingQ
      * Returns the samples for the given <var>groupCode</var> and <var>sampleTypeId</var> that are
      * assigned to an experiment.
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where s.expe_id is not null and g.dbin_id=?{1} and g.code=?{2} and s.saty_id=?{3} "
             + " order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getGroupSamplesForSampleTypeWithExperiment(long dbInstanceId,
             String groupCode, long sampleTypeId);
 
     /**
-     * Returns the samples for all groups.
+     * Returns the samples for all spaces.
      */
     @Select(sql = SELECT_FROM_SAMPLES_S + " join sample_types st on s.saty_id=st.id"
-            + " join groups g on s.grou_id=g.id "
+            + " join spaces g on s.space_id=g.id "
             + " where st.is_listable and g.dbin_id=?{1} order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getAllListableGroupSamples(long dbInstanceId);
 
     /**
-     * Returns the samples for all groups that are assigned to an experiment.
+     * Returns the samples for all spaces that are assigned to an experiment.
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where s.expe_id is not null and g.dbin_id=?{1}                 "
             + " order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getAllGroupSamplesWithExperiment(long dbInstanceId);
 
     /**
-     * Returns the samples for all groups and <var>sampleTypeId</var>
+     * Returns the samples for all spaces and <var>sampleTypeId</var>
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where g.dbin_id=?{1} and s.saty_id=?{2}                        "
             + " order by s.code", fetchSize = FETCH_SIZE, rubberstamp = true)
     public DataIterator<SampleRecord> getAllGroupSamplesForSampleType(long dbInstanceId,
             long sampleTypeId);
 
     /**
-     * Returns the samples for all groups and <var>sampleTypeId</var> that are assigned to an
+     * Returns the samples for all spaces and <var>sampleTypeId</var> that are assigned to an
      * experiment.
      */
-    @Select(sql = SELECT_FROM_SAMPLES_S + " join groups g on s.grou_id=g.id "
+    @Select(sql = SELECT_FROM_SAMPLES_S + " join spaces g on s.space_id=g.id "
             + " where s.expe_id is not null and g.dbin_id=?{1} and s.saty_id=?{2} "
             + " order by s.code", fetchSize = FETCH_SIZE)
     public DataIterator<SampleRecord> getAllGroupSamplesForSampleTypeWithExperiment(
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java
index d4e0de1c03c..c1fc5173275 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleLister.java
@@ -81,7 +81,7 @@ public class SampleLister implements ISampleLister
             SampleSkeleton sampleSkeleton = new SampleSkeleton();
             sampleSkeleton.setId(sampleRecord.id);
             sampleSkeleton.setExperimentID(sampleRecord.expe_id);
-            sampleSkeleton.setSpaceID(sampleRecord.grou_id);
+            sampleSkeleton.setSpaceID(sampleRecord.space_id);
             sampleSkeleton.setTypeID(sampleRecord.saty_id);
             sampleSkeleton.setDatabaseInstanceID(sampleRecord.dbin_id);
             if (criteria.isValid(sampleSkeleton))
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
index 2055dfcf46c..ac0dec78db7 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingWorker.java
@@ -557,7 +557,7 @@ final class SampleListingWorker extends AbstractLister
         sample.setSampleType(sampleTypes.get(row.saty_id));
 
         // set group or instance
-        if (row.grou_id == null)
+        if (row.space_id == null)
         {
             if (row.dbin_id.equals(databaseInstanceId))
             {
@@ -569,10 +569,10 @@ final class SampleListingWorker extends AbstractLister
             }
         } else
         {
-            final Space spaceOrNull = spaceMap.get(row.grou_id);
+            final Space spaceOrNull = spaceMap.get(row.space_id);
             if (spaceOrNull != null)
             {
-                setSpace(sample, spaceMap.get(row.grou_id));
+                setSpace(sample, spaceMap.get(row.space_id));
             } else
             // different db instance
             {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleRecord.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleRecord.java
index 68a6d26cbe5..ca357d45eb8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleRecord.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleRecord.java
@@ -19,7 +19,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.bo.common.CodeRecord;
 // PERS_ID_REGISTERER TECH_ID NOT NULL,
 // INVA_ID TECH_ID,
 // DBIN_ID TECH_ID,
-// GROU_ID TECH_ID,
+// SPACE_ID TECH_ID,
 // SAMP_ID_PART_OF TECH_ID);
 @Private
 public class SampleRecord extends CodeRecord
@@ -28,7 +28,7 @@ public class SampleRecord extends CodeRecord
 
     public Long expe_id;
 
-    public Long grou_id;
+    public Long space_id;
 
     public Long dbin_id;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwner.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwner.java
index 441967fd182..ecaebc358e8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwner.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwner.java
@@ -3,10 +3,10 @@ package ch.systemsx.cisd.openbis.generic.server.business.bo.util;
 import org.apache.commons.lang.builder.HashCodeBuilder;
 
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
- * Determines who is the <i>owner</i> of the sample: the group or to the database instance.
+ * Determines who is the <i>owner</i> of the sample: the space or to the database instance.
  * <p>
  * Stores the owner <i>PEs</i>.
  * </p>
@@ -14,20 +14,20 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
 public final class SampleOwner
 {
     // if filled, databaseInstanceOrNull must be null
-    private GroupPE groupOrNull;
+    private SpacePE spaceOrNull;
 
-    // if filled, groupOrNull must be null
+    // if filled, spaceOrNull must be null
     private DatabaseInstancePE databaseInstanceOrNull;
 
-    public SampleOwner(final GroupPE groupOrNull, final DatabaseInstancePE databaseInstanceOrNull)
+    public SampleOwner(final SpacePE spaceOrNull, final DatabaseInstancePE databaseInstanceOrNull)
     {
-        assert groupOrNull == null || databaseInstanceOrNull == null;
-        assert groupOrNull != null || databaseInstanceOrNull != null;
-        this.groupOrNull = groupOrNull;
+        assert spaceOrNull == null || databaseInstanceOrNull == null;
+        assert spaceOrNull != null || databaseInstanceOrNull != null;
+        this.spaceOrNull = spaceOrNull;
         this.databaseInstanceOrNull = databaseInstanceOrNull;
     }
 
-    public static SampleOwner createGroup(final GroupPE group)
+    public static SampleOwner createSpace(final SpacePE group)
     {
         return new SampleOwner(group, null);
     }
@@ -37,9 +37,9 @@ public final class SampleOwner
         return new SampleOwner(null, databaseInstance);
     }
 
-    public boolean isGroupLevel()
+    public boolean isSpaceLevel()
     {
-        return groupOrNull != null;
+        return spaceOrNull != null;
     }
 
     public boolean isDatabaseInstanceLevel()
@@ -47,9 +47,9 @@ public final class SampleOwner
         return databaseInstanceOrNull != null;
     }
 
-    public GroupPE tryGetGroup()
+    public SpacePE tryGetSpace()
     {
-        return groupOrNull;
+        return spaceOrNull;
     }
 
     public DatabaseInstancePE tryGetDatabaseInstance()
@@ -64,9 +64,9 @@ public final class SampleOwner
     @Override
     public String toString()
     {
-        if (isGroupLevel())
+        if (isSpaceLevel())
         {
-            return "group: " + groupOrNull;
+            return "space: " + spaceOrNull;
         } else
         {
             return "db instance: " + databaseInstanceOrNull;
@@ -85,9 +85,9 @@ public final class SampleOwner
             return false;
         }
         final SampleOwner that = (SampleOwner) obj;
-        if (isGroupLevel())
+        if (isSpaceLevel())
         {
-            return this.groupOrNull.equals(that.groupOrNull);
+            return this.spaceOrNull.equals(that.spaceOrNull);
         } else
         {
             return this.databaseInstanceOrNull.equals(that.databaseInstanceOrNull);
@@ -98,7 +98,7 @@ public final class SampleOwner
     public final int hashCode()
     {
         final HashCodeBuilder builder = new HashCodeBuilder();
-        builder.append(groupOrNull);
+        builder.append(spaceOrNull);
         builder.append(databaseInstanceOrNull);
         return builder.toHashCode();
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwnerFinder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwnerFinder.java
index 01af245b099..cc95f3908ea 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwnerFinder.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleOwnerFinder.java
@@ -21,7 +21,7 @@ import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IAuthorizationDAOFactory;
 import ch.systemsx.cisd.openbis.generic.server.util.GroupIdentifierHelper;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.exception.UndefinedSpaceException;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.DatabaseInstanceIdentifier;
@@ -100,22 +100,22 @@ public class SampleOwnerFinder
 
     private SampleOwner tryFindAbsoluteGroupOwner(final SpaceIdentifier spaceIdentifier)
     {
-        final GroupPE group =
+        final SpacePE group =
                 GroupIdentifierHelper.tryGetGroup(spaceIdentifier, personPE, daoFactory);
         if (group == null)
         {
             return null;
         }
-        return SampleOwner.createGroup(group);
+        return SampleOwner.createSpace(group);
     }
 
     private SampleOwner createHomeGroupOwner(final SampleOwnerIdentifier identifier)
     {
-        final GroupPE homeGroup = personPE.getHomeGroup();
+        final SpacePE homeGroup = personPE.getHomeSpace();
         if (homeGroup == null)
         {
             throw new UndefinedSpaceException();
         }
-        return SampleOwner.createGroup(homeGroup);
+        return SampleOwner.createSpace(homeGroup);
     }
 }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleUtils.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleUtils.java
index d4674533164..e371dbf7e6d 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleUtils.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/util/SampleUtils.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.server.business.bo.util;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 
 /**
@@ -47,13 +47,13 @@ public class SampleUtils
     }
 
     /** for all experiment samples which belonged to a group the specified group will be set */
-    public static void setSamplesGroup(ExperimentPE experiment, GroupPE group)
+    public static void setSamplesGroup(ExperimentPE experiment, SpacePE group)
     {
         for (SamplePE sample : experiment.getSamples())
         {
-            if (sample.getGroup() != null)
+            if (sample.getSpace() != null)
             {
-                sample.setGroup(group);
+                sample.setSpace(group);
             }
         }
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IAuthorizationDAOFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IAuthorizationDAOFactory.java
index ef02b73cd5f..34a13feba26 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IAuthorizationDAOFactory.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IAuthorizationDAOFactory.java
@@ -51,7 +51,7 @@ public interface IAuthorizationDAOFactory
 
     public IPersonDAO getPersonDAO();
 
-    public IGroupDAO getGroupDAO();
+    public ISpaceDAO getSpaceDAO();
 
     public IDatabaseInstanceDAO getDatabaseInstanceDAO();
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IProjectDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IProjectDAO.java
index 8e00021f1dc..6ec1129a493 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IProjectDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IProjectDAO.java
@@ -18,7 +18,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess;
 
 import java.util.List;
 
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 
 /**
@@ -34,15 +34,15 @@ public interface IProjectDAO extends IGenericDAO<ProjectPE>
     public List<ProjectPE> listProjects();
 
     /**
-     * Lists projects from given group.
+     * Lists projects from given space.
      */
-    public List<ProjectPE> listProjects(GroupPE group);
+    public List<ProjectPE> listProjects(SpacePE space);
 
     /**
-     * Returns project for given database instance code, group code and project code or null if such
+     * Returns project for given database instance code, space code and project code or null if such
      * a project does not exist.
      */
-    public ProjectPE tryFindProject(String databaseInstanceCode, String groupCode,
+    public ProjectPE tryFindProject(String databaseInstanceCode, String spaceCode,
             String projectCode);
 
     /**
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IRoleAssignmentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IRoleAssignmentDAO.java
index 848517395e5..39c8ca6f80c 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IRoleAssignmentDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IRoleAssignmentDAO.java
@@ -60,9 +60,9 @@ public interface IRoleAssignmentDAO extends IGenericDAO<RoleAssignmentPE>
     public List<RoleAssignmentPE> listRoleAssignmentsByPerson(final PersonPE person);
 
     /**
-     * Returns a {@link RoleAssignmentPE} described by given role, group code and grantee.
+     * Returns a {@link RoleAssignmentPE} described by given role, space code and grantee.
      */
-    public RoleAssignmentPE tryFindGroupRoleAssignment(RoleCode role, String group, Grantee grantee);
+    public RoleAssignmentPE tryFindSpaceRoleAssignment(RoleCode role, String space, Grantee grantee);
 
     /**
      * Returns a {@link RoleAssignmentPE} described by given role and grantee.
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISampleDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISampleDAO.java
index a43dd770fbd..89603e761d1 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISampleDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISampleDAO.java
@@ -24,7 +24,7 @@ import org.springframework.dao.DataAccessException;
 
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 
@@ -62,19 +62,19 @@ public interface ISampleDAO extends IGenericDAO<SamplePE>
             String containerCodeOrNull, final DatabaseInstancePE databaseInstance);
 
     /**
-     * Returns the sample specified by given <var>sampleCode</var> and given <var>group</var>.
+     * Returns the sample specified by given <var>sampleCode</var> and given <var>space</var>.
      */
-    SamplePE tryFindByCodeAndGroup(final String sampleCode, final GroupPE group)
+    SamplePE tryFindByCodeAndSpace(final String sampleCode, final SpacePE space)
             throws DataAccessException;
 
     /**
-     * Returns a list of samples with given <var>group</var> and one of given codes.
+     * Returns a list of samples with given <var>space</var> and one of given codes.
      * 
      * @param containerCodeOrNull if specified all returned samples should have container with
      *            specified code, otherwise they shouldn't have any container
      */
-    List<SamplePE> listByCodesAndGroup(final List<String> sampleCodes, String containerCodeOrNull,
-            final GroupPE group);
+    List<SamplePE> listByCodesAndSpace(final List<String> sampleCodes, String containerCodeOrNull,
+            final SpacePE space);
 
     /**
      * Inserts given list of {@link SamplePE} into the database in one go.
@@ -104,11 +104,11 @@ public interface ISampleDAO extends IGenericDAO<SamplePE>
     public Set<TechId> listParents(Collection<TechId> children, TechId relationship);
 
     /**
-     * Lists samples (with minimal additional information) belonging to the given <code>group</code>
+     * Lists samples (with minimal additional information) belonging to the given <code>space</code>
      * and having a property with the specified value.
      */
-    List<SamplePE> listSamplesByGroupAndProperty(final String propertyCode,
-            final String propertyValue, final GroupPE group) throws DataAccessException;
+    List<SamplePE> listSamplesBySpaceAndProperty(final String propertyCode,
+            final String propertyValue, final SpacePE space) throws DataAccessException;
 
     /**
      * Lists samples (with minimal additional information) with permanent identifier in given set of
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IGroupDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISpaceDAO.java
similarity index 60%
rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IGroupDAO.java
rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISpaceDAO.java
index 4c54ab7f9ff..a4bc5cfa555 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/IGroupDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/ISpaceDAO.java
@@ -21,33 +21,33 @@ import java.util.List;
 import org.springframework.dao.DataAccessException;
 
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
- * <i>Data Access Object</i> for {@link GroupPE}.
+ * <i>Data Access Object</i> for {@link SpacePE}.
  * 
  * @author Christian Ribeaud
  */
-public interface IGroupDAO extends IGenericDAO<GroupPE>
+public interface ISpaceDAO extends IGenericDAO<SpacePE>
 {
 
     /**
-     * Returns a list of {@link GroupPE}s (independent of {@link DatabaseInstancePE} each group
+     * Returns a list of {@link SpacePE}s (independent of {@link DatabaseInstancePE} each space
      * belongs to).
      */
-    public List<GroupPE> listGroups() throws DataAccessException;
+    public List<SpacePE> listSpaces() throws DataAccessException;
 
-    /** Lists all groups which belong to the specified database instance. */
-    public List<GroupPE> listGroups(final DatabaseInstancePE databaseInstance)
+    /** Lists all spaces which belong to the specified database instance. */
+    public List<SpacePE> listSpaces(final DatabaseInstancePE databaseInstance)
             throws DataAccessException;
 
-    /** Creates a new group in the database. */
-    public void createGroup(final GroupPE groupDTO) throws DataAccessException;
+    /** Creates a new space in the database. */
+    public void createSpace(final SpacePE spaceDTO) throws DataAccessException;
 
     /**
-     * Returns <code>GroupPE</code> identified by given <var>groupCode</var> and given
-     * <var>databaseInstanceId</var> or <code>null</code> if such a group does not exist.
+     * Returns space identified by given <var>spaceCode</var> and given
+     * <var>databaseInstanceId</var> or <code>null</code> if such a space does not exist.
      */
-    public GroupPE tryFindGroupByCodeAndDatabaseInstance(final String groupCode,
+    public SpacePE tryFindSpaceByCodeAndDatabaseInstance(final String spaceCode,
             final DatabaseInstancePE databaseInstance) throws DataAccessException;
 }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java
index 4f81bc8e51c..355bed73dab 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AuthorizationDAOFactory.java
@@ -34,7 +34,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGridCustomColumnDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGridCustomFilterDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPersonDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IQueryDAO;
@@ -61,7 +61,7 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory
 
     private final IRoleAssignmentDAO roleAssignmentDAO;
 
-    private final IGroupDAO groupDAO;
+    private final ISpaceDAO groupDAO;
 
     private final IPersonDAO personDAO;
 
@@ -96,7 +96,7 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory
         databaseInstancesDAO = new DatabaseInstanceDAO(sessionFactory);
         homeDatabaseInstance = getDatabaseInstanceId(context.getDatabaseInstance());
         personDAO = new PersonDAO(sessionFactory, homeDatabaseInstance);
-        groupDAO = new GroupDAO(sessionFactory, homeDatabaseInstance);
+        groupDAO = new SpaceDAO(sessionFactory, homeDatabaseInstance);
         roleAssignmentDAO = new RoleAssignmentDAO(sessionFactory, homeDatabaseInstance);
         externalDataDAO = new ExternalDataDAO(persistencyResources, homeDatabaseInstance);
         experimentDAO = new ExperimentDAO(persistencyResources, homeDatabaseInstance);
@@ -187,7 +187,7 @@ public class AuthorizationDAOFactory implements IAuthorizationDAOFactory
         return databaseInstancesDAO;
     }
 
-    public final IGroupDAO getGroupDAO()
+    public final ISpaceDAO getSpaceDAO()
     {
         return groupDAO;
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java
index 43c12e73d83..3236dd1e0a4 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/DatabaseVersionHolder.java
@@ -24,7 +24,7 @@ package ch.systemsx.cisd.openbis.generic.server.dataaccess.db;
 public final class DatabaseVersionHolder
 {
     /** Current version of the database. */
-    private static final String DATABASE_VERSION = "061";// S94
+    private static final String DATABASE_VERSION = "062";// S95
 
     private DatabaseVersionHolder()
     {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java
index ec095058722..399608c21cd 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDAO.java
@@ -393,7 +393,7 @@ final class HibernateSearchDAO extends HibernateDaoSupport implements IHibernate
 
         private String getSpaceIdFieldName()
         {
-            String groupId = SearchFieldConstants.PREFIX_GROUP + SearchFieldConstants.ID;
+            String groupId = SearchFieldConstants.PREFIX_SPACE + SearchFieldConstants.ID;
             if (searchableEntity.equals(SearchableEntity.EXPERIMENT))
             {
                 return SearchFieldConstants.PREFIX_PROJECT + groupId;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDataProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDataProvider.java
index c3f73f6f040..2f78138485b 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDataProvider.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/HibernateSearchDataProvider.java
@@ -22,7 +22,7 @@ import java.util.Map;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.GroupTranslator;
 
 /**
@@ -36,9 +36,9 @@ public class HibernateSearchDataProvider
 
     public HibernateSearchDataProvider(IDAOFactory factory)
     {
-        List<GroupPE> groups = factory.getGroupDAO().listGroups();
+        List<SpacePE> groups = factory.getSpaceDAO().listSpaces();
         groupsById = new HashMap<String, Space>();
-        for (GroupPE group : groups)
+        for (SpacePE group : groups)
         {
             groupsById.put(group.getId().toString(), GroupTranslator.translate(group));
         }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java
index 1069d0cab38..2ff36752377 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAO.java
@@ -32,7 +32,7 @@ import ch.systemsx.cisd.common.utilities.MethodUtils;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.CodeConverter;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 
 /**
@@ -62,41 +62,40 @@ public class ProjectDAO extends AbstractGenericEntityDAO<ProjectPE> implements I
         return list;
     }
 
-    public List<ProjectPE> listProjects(final GroupPE group)
+    public List<ProjectPE> listProjects(final SpacePE space)
     {
-        assert group != null : "Unspecified space.";
+        assert space != null : "Unspecified space.";
 
         final DetachedCriteria criteria = DetachedCriteria.forClass(ProjectPE.class);
-        criteria.add(Restrictions.eq("group", group));
+        criteria.add(Restrictions.eq("space", space));
         final List<ProjectPE> list = cast(getHibernateTemplate().findByCriteria(criteria));
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format("%s(%s): %d project(s) have been found.", MethodUtils
-                    .getCurrentMethod().getName(), group, list.size()));
+                    .getCurrentMethod().getName(), space, list.size()));
         }
         return list;
     }
 
-    public ProjectPE tryFindProject(final String databaseInstanceCode, final String groupCode,
+    public ProjectPE tryFindProject(final String databaseInstanceCode, final String spaceCode,
             final String projectCode)
     {
         assert projectCode != null : "Unspecified project code.";
-        assert groupCode != null : "Unspecified space code.";
+        assert spaceCode != null : "Unspecified space code.";
 
         final Criteria criteria = getSession().createCriteria(ProjectPE.class);
         criteria.add(Restrictions.eq("code", CodeConverter.tryToDatabase(projectCode)));
-        final Criteria groupCriteria = criteria.createCriteria("group");
-        groupCriteria.add(Restrictions.eq("code", CodeConverter.tryToDatabase(groupCode)));
+        final Criteria spaceCriteria = criteria.createCriteria("space");
+        spaceCriteria.add(Restrictions.eq("code", CodeConverter.tryToDatabase(spaceCode)));
         if (StringUtils.isBlank(databaseInstanceCode))
         {
-            groupCriteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance()));
+            spaceCriteria.add(Restrictions.eq("databaseInstance", getDatabaseInstance()));
         } else
         {
-            groupCriteria.createCriteria("databaseInstance").add(
+            spaceCriteria.createCriteria("databaseInstance").add(
                     Restrictions.eq("code", CodeConverter.tryToDatabase(databaseInstanceCode)));
         }
-        final ProjectPE project = (ProjectPE) criteria.uniqueResult();
-        return project;
+        return (ProjectPE) criteria.uniqueResult();
     }
 
     public void createProject(ProjectPE project)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java
index c040ab08e26..eb3047527ed 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAO.java
@@ -73,11 +73,11 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign
 
     public final List<RoleAssignmentPE> listRoleAssignments()
     {
-        // returns roles connected directly or indirectly (through group) to current db instance
+        // returns roles connected directly or indirectly (through space) to current db instance
         final List<RoleAssignmentPE> list =
                 cast(getHibernateTemplate().find(
                         String.format("select r from %s r left join r.databaseInstance ri"
-                                + " left join r.group g left join g.databaseInstance gi"
+                                + " left join r.space g left join g.databaseInstance gi"
                                 + " where ri = ? or (ri is null and gi = ?)", TABLE_NAME),
                         toArray(getDatabaseInstance(), getDatabaseInstance())));
         if (operationLog.isDebugEnabled())
@@ -152,8 +152,8 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign
         }
     }
 
-    public final RoleAssignmentPE tryFindGroupRoleAssignment(final RoleCode role,
-            final String group, final Grantee grantee)
+    public final RoleAssignmentPE tryFindSpaceRoleAssignment(final RoleCode role,
+            final String space, final Grantee grantee)
     {
         assert role != null : "Unspecified role.";
         assert grantee != null : "Unspecified grantee.";
@@ -162,10 +162,10 @@ public final class RoleAssignmentDAO extends AbstractGenericEntityDAO<RoleAssign
                 cast(getHibernateTemplate().find(
                         String.format("from %s r where r."
                                 + getGranteeHqlParameter(grantee.getType())
-                                + " = ? and group.code = ? " + "and r.role = ?", TABLE_NAME),
-                        toArray(grantee.getCode(), group, role)));
+                                + " = ? and space.code = ? " + "and r.role = ?", TABLE_NAME),
+                        toArray(grantee.getCode(), space, role)));
         final RoleAssignmentPE roleAssignment =
-                tryFindEntity(roles, "role_assignments", role, group, grantee);
+                tryFindEntity(roles, "role_assignments", role, space, grantee);
         if (operationLog.isInfoEnabled())
         {
             operationLog.info(String.format("FIND: space role assignment '%s'.", roleAssignment));
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java
index 543c722f628..ed79a71e6c2 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAO.java
@@ -46,7 +46,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.CodeConverter;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE.EntityType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventType;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePropertyPE;
@@ -113,31 +113,31 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE>
         return sample.getGenerated();
     }
 
-    public final List<SamplePE> listSamplesByGroupAndProperty(final String propertyCode,
-            final String propertyValue, final GroupPE group) throws DataAccessException
+    public final List<SamplePE> listSamplesBySpaceAndProperty(final String propertyCode,
+            final String propertyValue, final SpacePE space) throws DataAccessException
     {
-        assert group != null : "Unspecified space.";
+        assert space != null : "Unspecified space.";
         assert propertyCode != null : "Unspecified property code";
         assert propertyValue != null : "Unspecified property value";
 
         String queryFormat =
                 "from " + SamplePropertyPE.class.getSimpleName()
-                        + " where %s = ? and entity.group = ? "
+                        + " where %s = ? and entity.space = ? "
                         + " and entityTypePropertyType.propertyTypeInternal.simpleCode = ?"
                         + " and entityTypePropertyType.propertyTypeInternal.internalNamespace = ?";
         List<SamplePE> entities =
-                listByPropertyValue(queryFormat, propertyCode, propertyValue, group);
+                listByPropertyValue(queryFormat, propertyCode, propertyValue, space);
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format(
                     "%d samples have been found for space '%s' and property '%s' equal to '%s'.",
-                    entities.size(), group, propertyCode, propertyValue));
+                    entities.size(), space, propertyCode, propertyValue));
         }
         return entities;
     }
 
     private List<SamplePE> listByPropertyValue(String queryFormat, String propertyCode,
-            String propertyValue, GroupPE parent)
+            String propertyValue, SpacePE parent)
     {
         String simplePropertyCode = CodeConverter.tryToDatabase(propertyCode);
         boolean isInternalNamespace = CodeConverter.isInternalNamespace(propertyCode);
@@ -222,35 +222,35 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE>
         return result;
     }
 
-    public final SamplePE tryFindByCodeAndGroup(final String sampleCode, final GroupPE group)
+    public final SamplePE tryFindByCodeAndSpace(final String sampleCode, final SpacePE space)
     {
         assert sampleCode != null : "Unspecified sample code.";
-        assert group != null : "Unspecified space.";
+        assert space != null : "Unspecified space.";
 
-        Criteria criteria = createGroupCriteria(group);
+        Criteria criteria = createSpaceCriteria(space);
         addSampleCodeCriterion(criteria, sampleCode);
         SamplePE sample = (SamplePE) criteria.uniqueResult();
         if (sample == null && isFullCode(sampleCode) == false)
         {
-            criteria = createGroupCriteria(group);
+            criteria = createSpaceCriteria(space);
             sample = tryFindContainedSampleWithUniqueSubcode(criteria, sampleCode);
         }
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format(
                     "Following sample '%s' has been found for code '%s' and space '%s'.", sample,
-                    sampleCode, group));
+                    sampleCode, space));
         }
         return sample;
     }
 
-    public final List<SamplePE> listByCodesAndGroup(final List<String> sampleCodes,
-            final String containerCodeOrNull, final GroupPE group)
+    public final List<SamplePE> listByCodesAndSpace(final List<String> sampleCodes,
+            final String containerCodeOrNull, final SpacePE space)
     {
         assert sampleCodes != null : "Unspecified sample codes.";
-        assert group != null : "Unspecified space.";
+        assert space != null : "Unspecified space.";
 
-        Criteria criteria = createGroupCriteria(group);
+        Criteria criteria = createSpaceCriteria(space);
         addSampleCodesCriterion(criteria, sampleCodes, containerCodeOrNull);
         List<SamplePE> result = cast(criteria.list());
         if (operationLog.isDebugEnabled())
@@ -286,9 +286,9 @@ public class SampleDAO extends AbstractGenericEntityWithPropertiesDAO<SamplePE>
         return createFindCriteria(Restrictions.eq("databaseInstance", databaseInstance));
     }
 
-    private Criteria createGroupCriteria(final GroupPE group)
+    private Criteria createSpaceCriteria(final SpacePE space)
     {
-        return createFindCriteria(Restrictions.eq("group", group));
+        return createFindCriteria(Restrictions.eq("space", space));
     }
 
     private void addSampleCodesCriterion(Criteria criteria, List<String> sampleCodes,
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java
similarity index 71%
rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAO.java
rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java
index 18975615636..7d697b633ef 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAO.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SpaceDAO.java
@@ -29,17 +29,17 @@ import org.springframework.orm.hibernate3.HibernateTemplate;
 import ch.systemsx.cisd.common.logging.LogCategory;
 import ch.systemsx.cisd.common.logging.LogFactory;
 import ch.systemsx.cisd.common.utilities.MethodUtils;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.CodeConverter;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
- * <i>Data Access Object</i> implementation for {@link GroupPE}.
+ * <i>Data Access Object</i> implementation for {@link SpacePE}.
  * 
  * @author Christian Ribeaud
  */
-final class GroupDAO extends AbstractGenericEntityDAO<GroupPE> implements IGroupDAO
+final class SpaceDAO extends AbstractGenericEntityDAO<SpacePE> implements ISpaceDAO
 {
 
     /**
@@ -47,40 +47,40 @@ final class GroupDAO extends AbstractGenericEntityDAO<GroupPE> implements IGroup
      * appropriate debugging level for class {@link JdbcAccessor}. </p>
      */
     private static final Logger operationLog =
-            LogFactory.getLogger(LogCategory.OPERATION, GroupDAO.class);
+            LogFactory.getLogger(LogCategory.OPERATION, SpaceDAO.class);
 
-    GroupDAO(final SessionFactory sessionFactory, final DatabaseInstancePE databaseInstance)
+    SpaceDAO(final SessionFactory sessionFactory, final DatabaseInstancePE databaseInstance)
     {
-        super(sessionFactory, databaseInstance, GroupPE.class);
+        super(sessionFactory, databaseInstance, SpacePE.class);
     }
 
     //
-    // IGroupDAO
+    // ISpaceDAO
     //
 
-    public final GroupPE tryFindGroupByCodeAndDatabaseInstance(final String groupCode,
+    public final SpacePE tryFindSpaceByCodeAndDatabaseInstance(final String spaceCode,
             final DatabaseInstancePE databaseInstance) throws DataAccessException
     {
-        assert groupCode != null : "Unspecified space code.";
+        assert spaceCode != null : "Unspecified space code.";
         assert databaseInstance != null : "Unspecified database instance.";
 
-        final List<GroupPE> list =
+        final List<SpacePE> list =
                 cast(getHibernateTemplate().find(
                         String.format("select g from %s g where g.code = ? "
                                 + "and g.databaseInstance = ?", getEntityClass().getSimpleName()),
-                        toArray(CodeConverter.tryToDatabase(groupCode), databaseInstance)));
-        final GroupPE entity = tryFindEntity(list, "group");
+                        toArray(CodeConverter.tryToDatabase(spaceCode), databaseInstance)));
+        final SpacePE entity = tryFindEntity(list, "space");
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format("%s(%s, %s): '%s'.", MethodUtils.getCurrentMethod()
-                    .getName(), groupCode, databaseInstance, entity));
+                    .getName(), spaceCode, databaseInstance, entity));
         }
         return entity;
     }
 
-    public final List<GroupPE> listGroups() throws DataAccessException
+    public final List<SpacePE> listSpaces() throws DataAccessException
     {
-        final List<GroupPE> list = cast(getHibernateTemplate().loadAll(getEntityClass()));
+        final List<SpacePE> list = cast(getHibernateTemplate().loadAll(getEntityClass()));
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format("%s(): %d space(s) have been found.", MethodUtils
@@ -89,14 +89,14 @@ final class GroupDAO extends AbstractGenericEntityDAO<GroupPE> implements IGroup
         return list;
     }
 
-    public final List<GroupPE> listGroups(final DatabaseInstancePE databaseInstance)
+    public final List<SpacePE> listSpaces(final DatabaseInstancePE databaseInstance)
             throws DataAccessException
     {
         assert databaseInstance != null : "Unspecified database instance.";
 
         final DetachedCriteria criteria = DetachedCriteria.forClass(getEntityClass());
         criteria.add(Restrictions.eq("databaseInstance", databaseInstance));
-        final List<GroupPE> list = cast(getHibernateTemplate().findByCriteria(criteria));
+        final List<SpacePE> list = cast(getHibernateTemplate().findByCriteria(criteria));
         if (operationLog.isDebugEnabled())
         {
             operationLog.debug(String.format("%s(%s): %d space(s) have been found.", MethodUtils
@@ -105,18 +105,18 @@ final class GroupDAO extends AbstractGenericEntityDAO<GroupPE> implements IGroup
         return list;
     }
 
-    public final void createGroup(final GroupPE group) throws DataAccessException
+    public final void createSpace(final SpacePE space) throws DataAccessException
     {
-        assert group != null : "Unspecified space";
-        validatePE(group);
+        assert space != null : "Unspecified space";
+        validatePE(space);
 
         final HibernateTemplate template = getHibernateTemplate();
-        group.setCode(CodeConverter.tryToDatabase(group.getCode()));
-        template.save(group);
+        space.setCode(CodeConverter.tryToDatabase(space.getCode()));
+        template.save(space);
         template.flush();
         if (operationLog.isInfoEnabled())
         {
-            operationLog.info(String.format("ADD: space '%s'.", group));
+            operationLog.info(String.format("ADD: space '%s'.", space));
         }
     }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java
index 4aa7e9449fc..f28eae16e1c 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/search/detailed/IndexFieldNameHelper.java
@@ -89,7 +89,7 @@ class IndexFieldNameHelper
             case PROJECT:
                 return SearchFieldConstants.PREFIX_PROJECT + CODE;
             case PROJECT_GROUP:
-                return SearchFieldConstants.PREFIX_PROJECT + SearchFieldConstants.PREFIX_GROUP
+                return SearchFieldConstants.PREFIX_PROJECT + SearchFieldConstants.PREFIX_SPACE
                         + CODE;
         }
         return null; // cannot happen
@@ -117,7 +117,7 @@ class IndexFieldNameHelper
             case SAMPLE_TYPE:
                 return SearchFieldConstants.PREFIX_ENTITY_TYPE + CODE;
             case GROUP:
-                return SearchFieldConstants.PREFIX_GROUP + CODE;
+                return SearchFieldConstants.PREFIX_SPACE + CODE;
         }
         return null; // cannot happen
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java
index 592c9844e62..a2fbfd93fca 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/util/GroupIdentifierHelper.java
@@ -22,10 +22,10 @@ import ch.systemsx.cisd.common.collections.TableMap;
 import ch.systemsx.cisd.common.exceptions.InternalErr;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IAuthorizationDAOFactory;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.shared.IDatabaseInstanceFinder;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.DatabaseInstanceIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier;
@@ -201,14 +201,14 @@ public final class GroupIdentifierHelper
     }
 
     /** finds a space in the database for the given identifier */
-    public static final GroupPE tryGetGroup(final SpaceIdentifier spaceIdentifier,
+    public static final SpacePE tryGetGroup(final SpaceIdentifier spaceIdentifier,
             final PersonPE person, final IAuthorizationDAOFactory daoFactory)
     {
         final String spaceCode = SpaceCodeHelper.getSpaceCode(person, spaceIdentifier);
         final DatabaseInstancePE databaseInstance =
                 getDatabaseInstance(spaceIdentifier, daoFactory);
-        final IGroupDAO groupDAO = daoFactory.getGroupDAO();
-        return groupDAO.tryFindGroupByCodeAndDatabaseInstance(spaceCode, databaseInstance);
+        final ISpaceDAO groupDAO = daoFactory.getSpaceDAO();
+        return groupDAO.tryFindSpaceByCodeAndDatabaseInstance(spaceCode, databaseInstance);
     }
 
     public final static DatabaseInstancePE getDatabaseInstance(
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java
index 5cf67df56d9..c2d29bb76fd 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/LogMessagePrefixGenerator.java
@@ -17,7 +17,7 @@
 package ch.systemsx.cisd.openbis.generic.shared;
 
 import ch.systemsx.cisd.authentication.ILogMessagePrefixGenerator;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
 
@@ -36,7 +36,7 @@ public final class LogMessagePrefixGenerator implements ILogMessagePrefixGenerat
         PersonPE person = sessionOrNull.tryGetPerson();
         if (person != null)
         {
-            GroupPE homeGroup = person.getHomeGroup();
+            SpacePE homeGroup = person.getHomeSpace();
             if (homeGroup != null)
             {
                 groupCode = homeGroup.getCode();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/IAuthorizationDataProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/IAuthorizationDataProvider.java
index bda71e83f16..10acf6b3a00 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/IAuthorizationDataProvider.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/IAuthorizationDataProvider.java
@@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomColumnPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomFilterPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.QueryPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleAccessPE;
@@ -43,13 +43,13 @@ public interface IAuthorizationDataProvider extends IDatabaseInstanceFinder
     /**
      * Returns a list of all groups.
      */
-    public List<GroupPE> listGroups();
+    public List<SpacePE> listGroups();
 
     /**
      * Returns the space for the given <var>spaceCode</var> or <code>null</code>, if it does not
      * exist.
      */
-    public GroupPE tryGetSpace(DatabaseInstancePE databaseInstance, String spaceCode);
+    public SpacePE tryGetSpace(DatabaseInstancePE databaseInstance, String spaceCode);
 
     /**
      * Returns the experiment for the given <var>permId</var> or <code>null</code>, if it does not
@@ -90,7 +90,7 @@ public interface IAuthorizationDataProvider extends IDatabaseInstanceFinder
      * 
      * @return <code>null</code> if entity has no group set.
      */
-    public GroupPE tryToGetGroup(SpaceOwnerKind entityKind, TechId techId);
+    public SpacePE tryToGetGroup(SpaceOwnerKind entityKind, TechId techId);
 
     /**
      * Returns the sample with given <var>techId</var>.
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifier.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifier.java
index 07b90df392b..956a27bb839 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifier.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifier.java
@@ -21,7 +21,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleLevel;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.IdentifierHelper;
 
@@ -42,11 +42,11 @@ public final class RoleWithIdentifier
 
     private final DatabaseInstancePE databaseInstanceOrNull;
 
-    private final GroupPE groupOrNull;
+    private final SpacePE groupOrNull;
 
     @Private
     RoleWithIdentifier(final RoleLevel roleGroup, final RoleCode roleName,
-            final DatabaseInstancePE databaseInstanceOrNull, final GroupPE groupOrNull)
+            final DatabaseInstancePE databaseInstanceOrNull, final SpacePE groupOrNull)
     {
         role = RoleWithHierarchy.valueOf(roleGroup, roleName);
         if (RoleLevel.SPACE.equals(roleGroup))
@@ -78,7 +78,7 @@ public final class RoleWithIdentifier
      * 
      * @return group to which the role is assigned
      */
-    public final GroupPE getAssignedGroup()
+    public final SpacePE getAssignedGroup()
     {
         assert groupOrNull != null;
         return groupOrNull;
@@ -93,16 +93,16 @@ public final class RoleWithIdentifier
         final RoleLevel roleGroup = figureRoleLevel(roleAssignment);
         final RoleCode roleName = roleAssignment.getRole();
         final DatabaseInstancePE databaseInstance = roleAssignment.getDatabaseInstance();
-        final GroupPE group = roleAssignment.getGroup();
+        final SpacePE group = roleAssignment.getSpace();
         return new RoleWithIdentifier(roleGroup, roleName, databaseInstance, group);
     }
 
     private static RoleLevel figureRoleLevel(final RoleAssignmentPE roleAssignment)
     {
-        assert roleAssignment.getDatabaseInstance() == null || roleAssignment.getGroup() == null : "Either the space or the database instance must be null";
+        assert roleAssignment.getDatabaseInstance() == null || roleAssignment.getSpace() == null : "Either the space or the database instance must be null";
         final RoleLevel roleGroup =
                 roleAssignment.getDatabaseInstance() != null ? RoleLevel.INSTANCE : roleAssignment
-                        .getGroup() != null ? RoleLevel.SPACE : null;
+                        .getSpace() != null ? RoleLevel.SPACE : null;
         assert roleGroup != null : "Either the space or the database instance must not be null";
         return roleGroup;
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractGroupPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractGroupPredicate.java
index 834697e2e19..76a98b78b49 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractGroupPredicate.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractGroupPredicate.java
@@ -23,7 +23,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.IAuthorizationDataP
 import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleLevel;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 
 /**
@@ -34,7 +34,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 public abstract class AbstractGroupPredicate<T> extends AbstractDatabaseInstancePredicate<T>
 {
 
-    protected List<GroupPE> groups;
+    protected List<SpacePE> groups;
 
     @Override
     public void init(IAuthorizationDataProvider provider)
@@ -69,9 +69,9 @@ public abstract class AbstractGroupPredicate<T> extends AbstractDatabaseInstance
                 person.getUserId()));
     }
 
-    private GroupPE tryFindGroup(final String databaseInstanceUUID, final String groupCode)
+    private SpacePE tryFindGroup(final String databaseInstanceUUID, final String groupCode)
     {
-        for (final GroupPE group : groups)
+        for (final SpacePE group : groups)
         {
             if (equalIdentifier(group, databaseInstanceUUID, groupCode))
             {
@@ -103,7 +103,7 @@ public abstract class AbstractGroupPredicate<T> extends AbstractDatabaseInstance
         return false;
     }
 
-    private boolean equalIdentifier(final GroupPE group, final String databaseInstanceUUID,
+    private boolean equalIdentifier(final SpacePE group, final String databaseInstanceUUID,
             final String groupCodeOrNull)
     {
         return (groupCodeOrNull == null || group.getCode().equals(groupCodeOrNull))
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicate.java
index aa951f36b1a..990790a27d8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicate.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicate.java
@@ -23,7 +23,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.SpaceOwnerKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.util.SpaceCodeHelper;
 
@@ -106,7 +106,7 @@ public abstract class AbstractTechIdPredicate extends AbstractGroupPredicate<Tec
     {
         assert initialized : "Predicate has not been initialized";
 
-        GroupPE groupOrNull = authorizationDataProvider.tryToGetGroup(entityKind, techId);
+        SpacePE groupOrNull = authorizationDataProvider.tryToGetGroup(entityKind, techId);
         if (groupOrNull == null)
         {
             return Status.createError(String.format("User '%s' does not have enough privileges.",
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodeCollectionPredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodeCollectionPredicate.java
index 576148a9b30..050d1d27147 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodeCollectionPredicate.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodeCollectionPredicate.java
@@ -53,9 +53,9 @@ public class DataSetCodeCollectionPredicate extends AbstractGroupPredicate<List<
         {
             String dbInstanceUUID = accessDatum.getDatabaseInstanceUuid();
             String dbInstanceCode = accessDatum.getDatabaseInstanceCode();
-            String groupCode = accessDatum.getGroupCode();
+            String spaceCode = accessDatum.getSpaceCode();
             Status result =
-                    evaluate(person, allowedRoles, dbInstanceUUID, dbInstanceCode, groupCode);
+                    evaluate(person, allowedRoles, dbInstanceUUID, dbInstanceCode, spaceCode);
             if (result != Status.OK)
             {
                 return result;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodePredicate.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodePredicate.java
index 4631d636848..1b244ed0db6 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodePredicate.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/DataSetCodePredicate.java
@@ -48,7 +48,7 @@ public class DataSetCodePredicate extends AbstractGroupPredicate<String>
         {
             String dbInstanceUUID = accessData.getDatabaseInstanceUuid();
             String dbInstanceCode = accessData.getDatabaseInstanceCode();
-            String groupCode = accessData.getGroupCode();
+            String groupCode = accessData.getSpaceCode();
             Status result =
                     evaluate(person, allowedRoles, dbInstanceUUID, dbInstanceCode, groupCode);
             return result;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SpaceValidator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SpaceValidator.java
index 04ffdcb65aa..fef3ec68560 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SpaceValidator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SpaceValidator.java
@@ -20,7 +20,7 @@ import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseInstance;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 
@@ -48,7 +48,7 @@ public final class SpaceValidator extends AbstractValidator<Space>
         final Set<RoleAssignmentPE> roleAssignments = person.getAllPersonRoles();
         for (final RoleAssignmentPE roleAssignment : roleAssignments)
         {
-            final GroupPE group = roleAssignment.getGroup();
+            final SpacePE group = roleAssignment.getSpace();
             if (group != null && group.getCode().equals(value.getCode())
                     && group.getDatabaseInstance().getUuid().equals(value.getInstance().getUuid()))
             {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java
index c81baea8ac7..7beb3535629 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ColumnNames.java
@@ -112,9 +112,7 @@ public final class ColumnNames
 
     public static final String GENERATED_FROM_SAMPLE_COLUMN = "samp_id_generated_from";
 
-    public static final String GROUP_COLUMN = "grou_id";
-
-    public static final String GROUP_PARENT_COLUMN = "grou_id_parent";
+    public static final String SPACE_COLUMN = "space_id";
 
     public static final String ID_COLUMN = "id";
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
index 9b00a972cd4..3b7e4f359ce 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/DataSetAccessPE.java
@@ -35,15 +35,15 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
 @SqlResultSetMapping(name = "implicit", entities = @EntityResult(entityClass = DataSetAccessPE.class))
 @NamedNativeQuery(name = "dataset_access", query = "select "
         + "g.code as groupCode, dbi.uuid as databaseInstanceUuid, dbi.code as databaseInstanceCode "
-        + "from " + TableNames.PROJECTS_TABLE + " p, " + TableNames.GROUPS_TABLE + " g, "
+        + "from " + TableNames.PROJECTS_TABLE + " p, " + TableNames.SPACES_TABLE + " g, "
         + TableNames.DATABASE_INSTANCES_TABLE + " dbi " + "where p.id in "
         + "(select e.proj_id from " + TableNames.DATA_TABLE + " ds, "
         + TableNames.EXPERIMENTS_TABLE + " e "
         + "where ds.code in (:codes) and ds.expe_id = e.id group by e.proj_id) "
-        + "and p.grou_id = g.id and dbi.id = g.dbin_id", resultSetMapping = "implicit")
+        + "and p.space_id = g.id and dbi.id = g.dbin_id", resultSetMapping = "implicit")
 public class DataSetAccessPE
 {
-    private String groupCode;
+    private String spaceCode;
 
     private String databaseInstanceUuid;
 
@@ -61,15 +61,15 @@ public class DataSetAccessPE
             String databaseInstanceCode)
     {
         DataSetAccessPE newMe = new DataSetAccessPE();
-        newMe.setGroupCode(groupCode);
+        newMe.setSpaceCode(groupCode);
         newMe.setDatabaseInstanceUuid(databaseInstanceUuid);
         newMe.setDatabaseInstanceCode(databaseInstanceCode);
         return newMe;
     }
 
-    void setGroupCode(String groupCode)
+    void setSpaceCode(String spaceCode)
     {
-        this.groupCode = groupCode;
+        this.spaceCode = spaceCode;
     }
 
     void setDatabaseInstanceUuid(String databaseInstanceUuid)
@@ -83,9 +83,9 @@ public class DataSetAccessPE
     }
 
     @Id
-    public String getGroupCode()
+    public String getSpaceCode()
     {
-        return groupCode;
+        return spaceCode;
     }
 
     public String getDatabaseInstanceUuid()
@@ -115,7 +115,7 @@ public class DataSetAccessPE
         }
         final DataSetAccessPE that = (DataSetAccessPE) obj;
         final EqualsBuilder builder = new EqualsBuilder();
-        builder.append(getGroupCode(), that.getGroupCode());
+        builder.append(getSpaceCode(), that.getSpaceCode());
         builder.append(getDatabaseInstanceCode(), that.getDatabaseInstanceCode());
         builder.append(getDatabaseInstanceUuid(), that.getDatabaseInstanceUuid());
         return builder.isEquals();
@@ -125,7 +125,7 @@ public class DataSetAccessPE
     public int hashCode()
     {
         final HashCodeBuilder builder = new HashCodeBuilder();
-        builder.append(getGroupCode());
+        builder.append(getSpaceCode());
         builder.append(getDatabaseInstanceCode());
         builder.append(getDatabaseInstanceUuid());
         return builder.toHashCode();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java
index 87b014f6df8..518281c0d43 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/EventPE.java
@@ -54,7 +54,7 @@ public class EventPE extends HibernateAbstractRegistrationHolder implements IIdH
 
     public enum EntityType
     {
-        ATTACHMENT, DATASET, EXPERIMENT, GROUP, MATERIAL, PROJECT, PROPERTY_TYPE, SAMPLE,
+        ATTACHMENT, DATASET, EXPERIMENT, SPACE, MATERIAL, PROJECT, PROPERTY_TYPE, SAMPLE,
         VOCABULARY, AUTHORIZATION_GROUP;
     }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java
index b228be0536b..e0c75b273f8 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/PersonPE.java
@@ -80,7 +80,7 @@ public final class PersonPE extends HibernateAbstractRegistrationHolder implemen
      */
     public static final String SYSTEM_USER_ID = "system";
 
-    private GroupPE homeGroup;
+    private SpacePE homeSpace;
 
     private transient Long id;
 
@@ -189,15 +189,15 @@ public final class PersonPE extends HibernateAbstractRegistrationHolder implemen
     }
 
     @ManyToOne(fetch = FetchType.EAGER)
-    @JoinColumn(name = ColumnNames.GROUP_COLUMN)
-    public final GroupPE getHomeGroup()
+    @JoinColumn(name = ColumnNames.SPACE_COLUMN)
+    public final SpacePE getHomeSpace()
     {
-        return homeGroup;
+        return homeSpace;
     }
 
-    public final void setHomeGroup(final GroupPE homeGroup)
+    public final void setHomeSpace(final SpacePE homeSpace)
     {
-        this.homeGroup = homeGroup;
+        this.homeSpace = homeSpace;
     }
 
     @OneToMany(fetch = FetchType.LAZY, mappedBy = "personInternal")
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java
index 07803f32143..a872e9812a5 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ProjectPE.java
@@ -73,7 +73,7 @@ import ch.systemsx.cisd.openbis.generic.shared.util.EqualsHashUtils;
 @Entity
 @Table(name = TableNames.PROJECTS_TABLE, uniqueConstraints =
     { @UniqueConstraint(columnNames =
-        { ColumnNames.CODE_COLUMN, ColumnNames.GROUP_COLUMN }) })
+        { ColumnNames.CODE_COLUMN, ColumnNames.SPACE_COLUMN }) })
 @Friend(toClasses = ExperimentPE.class)
 public final class ProjectPE extends AttachmentHolderPE implements Comparable<ProjectPE>,
         IIdAndCodeHolder, Serializable
@@ -84,7 +84,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr
 
     private transient Long id;
 
-    private GroupPE group;
+    private SpacePE space;
 
     private List<ExperimentPE> experiments = new ArrayList<ExperimentPE>();
 
@@ -135,23 +135,20 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr
     }
 
     /**
-     * Sets the group which this <code>ProjectDTO</code> is related to.
-     * 
-     * @throws AssertionError if <code>groupId</code> is defined but unequal
-     *             <code>group.getId()</code>.
+     * Sets the space which this <code>ProjectDTO</code> is related to.
      */
-    public final void setGroup(final GroupPE group)
+    public final void setSpace(final SpacePE space)
     {
-        this.group = group;
+        this.space = space;
     }
 
     @ManyToOne(fetch = FetchType.EAGER)
-    @NotNull(message = ValidationMessages.GROUP_NOT_NULL_MESSAGE)
-    @JoinColumn(name = ColumnNames.GROUP_COLUMN, updatable = true)
-    @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_GROUP)
-    public final GroupPE getGroup()
+    @NotNull(message = ValidationMessages.SPACE_NOT_NULL_MESSAGE)
+    @JoinColumn(name = ColumnNames.SPACE_COLUMN, updatable = true)
+    @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_SPACE)
+    public final SpacePE getSpace()
     {
-        return group;
+        return space;
     }
 
     @OneToMany(fetch = FetchType.LAZY, mappedBy = "projectInternal")
@@ -244,7 +241,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr
     public final boolean equals(final Object obj)
     {
         EqualsHashUtils.assertDefined(getCode(), "code");
-        EqualsHashUtils.assertDefined(getGroup(), "space");
+        EqualsHashUtils.assertDefined(getSpace(), "space");
         if (obj == this)
         {
             return true;
@@ -256,7 +253,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr
         final ProjectPE that = (ProjectPE) obj;
         final EqualsBuilder builder = new EqualsBuilder();
         builder.append(getCode(), that.getCode());
-        builder.append(getGroup(), that.getGroup());
+        builder.append(getSpace(), that.getSpace());
         return builder.isEquals();
     }
 
@@ -265,7 +262,7 @@ public final class ProjectPE extends AttachmentHolderPE implements Comparable<Pr
     {
         final HashCodeBuilder builder = new HashCodeBuilder();
         builder.append(getCode());
-        builder.append(getGroup());
+        builder.append(getSpace());
         return builder.toHashCode();
     }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java
index 35c1a0ec001..b136ed6cea2 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/RoleAssignmentPE.java
@@ -52,7 +52,7 @@ import ch.systemsx.cisd.openbis.generic.shared.util.EqualsHashUtils;
  */
 
 @Entity
-@Check(constraints = "((DBIN_ID IS NOT NULL AND GROU_ID IS NULL) OR (DBIN_ID IS NULL AND GROU_ID IS NOT NULL))"
+@Check(constraints = "((DBIN_ID IS NOT NULL AND SPACE_ID IS NULL) OR (DBIN_ID IS NULL AND SPACE_ID IS NOT NULL))"
         + " AND "
         + "((AG_ID_GRANTEE IS NOT NULL AND PERS_ID_GRANTEE IS NULL) OR (AG_ID_GRANTEE IS NULL AND PERS_ID_GRANTEE IS NOT NULL))")
 @Table(name = TableNames.ROLE_ASSIGNMENTS_TABLE)
@@ -68,7 +68,7 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder
 
     private DatabaseInstancePE databaseInstance;
 
-    private GroupPE group;
+    private SpacePE space;
 
     private PersonPE person;
 
@@ -135,15 +135,15 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder
     }
 
     @ManyToOne(fetch = FetchType.EAGER)
-    @JoinColumn(name = ColumnNames.GROUP_COLUMN, updatable = false)
-    public final GroupPE getGroup()
+    @JoinColumn(name = ColumnNames.SPACE_COLUMN, updatable = false)
+    public final SpacePE getSpace()
     {
-        return group;
+        return space;
     }
 
-    public final void setGroup(final GroupPE group)
+    public final void setSpace(final SpacePE space)
     {
-        this.group = group;
+        this.space = space;
     }
 
     @ManyToOne(fetch = FetchType.EAGER)
@@ -182,7 +182,7 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder
         {
             EqualsHashUtils.assertDefined(getAuthorizationGroupInternal(), "authorization group");
         }
-        if (getGroup() == null)
+        if (getSpace() == null)
         {
             EqualsHashUtils.assertDefined(getDatabaseInstance(), "db");
         }
@@ -200,7 +200,7 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder
         builder.append(getPerson(), that.getPerson());
         builder.append(getAuthorizationGroup(), that.getAuthorizationGroup());
         builder.append(getDatabaseInstance(), that.getDatabaseInstance());
-        builder.append(getGroup(), that.getGroup());
+        builder.append(getSpace(), that.getSpace());
         return builder.isEquals();
     }
 
@@ -211,7 +211,7 @@ public final class RoleAssignmentPE extends HibernateAbstractRegistrationHolder
         builder.append(getRole());
         builder.append(getPerson());
         builder.append(getDatabaseInstance());
-        builder.append(getGroup());
+        builder.append(getSpace());
         return builder.toHashCode();
     }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleAccessPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleAccessPE.java
index 2feca3dba41..10852547e38 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleAccessPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SampleAccessPE.java
@@ -47,9 +47,9 @@ import org.apache.commons.lang.builder.ToStringBuilder;
                     + "FROM "
                     + TableNames.SAMPLES_TABLE
                     + " s, "
-                    + TableNames.GROUPS_TABLE
+                    + TableNames.SPACES_TABLE
                     + " g "
-                    + "WHERE s.id in (:ids) and s.grou_id = g.id", resultSetMapping = "implicit1"),
+                    + "WHERE s.id in (:ids) and s.space_id = g.id", resultSetMapping = "implicit1"),
             @NamedNativeQuery(name = "shared_sample_access", query = "SELECT DISTINCT dbi.code as ownerCode, 'DATABASE_INSTANCE' as ownerType "
                     + "FROM "
                     + TableNames.SAMPLES_TABLE
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java
index 0857aea6498..001924f26f5 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SamplePE.java
@@ -82,8 +82,8 @@ import ch.systemsx.cisd.openbis.generic.shared.util.HibernateUtils;
 @Entity
 @Table(name = TableNames.SAMPLES_TABLE)
 @Check(constraints = "(" + ColumnNames.DATABASE_INSTANCE_COLUMN + " IS NOT NULL AND "
-        + ColumnNames.GROUP_COLUMN + " IS NULL) OR (" + ColumnNames.DATABASE_INSTANCE_COLUMN
-        + " IS NULL AND " + ColumnNames.GROUP_COLUMN + " IS NOT NULL)")
+        + ColumnNames.SPACE_COLUMN + " IS NULL) OR (" + ColumnNames.DATABASE_INSTANCE_COLUMN
+        + " IS NULL AND " + ColumnNames.SPACE_COLUMN + " IS NOT NULL)")
 @Indexed
 public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Comparable<SamplePE>,
         IEntityInformationWithPropertiesHolder, IMatchingEntity, Serializable
@@ -102,7 +102,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
 
     private DatabaseInstancePE databaseInstance;
 
-    private GroupPE group;
+    private SpacePE space;
 
     private SampleIdentifier sampleIdentifier;
 
@@ -315,16 +315,16 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
     }
 
     @ManyToOne(fetch = FetchType.EAGER)
-    @JoinColumn(name = ColumnNames.GROUP_COLUMN, updatable = true)
-    @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_GROUP)
-    public GroupPE getGroup()
+    @JoinColumn(name = ColumnNames.SPACE_COLUMN, updatable = true)
+    @IndexedEmbedded(prefix = SearchFieldConstants.PREFIX_SPACE)
+    public SpacePE getSpace()
     {
-        return group;
+        return space;
     }
 
-    public void setGroup(final GroupPE group)
+    public void setSpace(final SpacePE space)
     {
-        this.group = group;
+        this.space = space;
     }
 
     public void setCode(final String code)
@@ -539,7 +539,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
         final EqualsBuilder builder = new EqualsBuilder();
         builder.append(getCode(), that.getCode());
         builder.append(getDatabaseInstance(), that.getDatabaseInstance());
-        builder.append(getGroup(), that.getGroup());
+        builder.append(getSpace(), that.getSpace());
         return builder.isEquals();
     }
 
@@ -549,7 +549,7 @@ public class SamplePE extends AttachmentHolderPE implements IIdAndCodeHolder, Co
         final HashCodeBuilder builder = new HashCodeBuilder();
         builder.append(getCode());
         builder.append(getDatabaseInstance());
-        builder.append(getGroup());
+        builder.append(getSpace());
         return builder.toHashCode();
     }
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SequenceNames.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SequenceNames.java
index d2c1f357821..b00a3c42011 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SequenceNames.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SequenceNames.java
@@ -64,7 +64,7 @@ public final class SequenceNames
 
     public static final String RELATIONSHIP_TYPE_SEQUENCE = "RELATIONSHIP_TYPE_ID_SEQ";
 
-    public static final String GROUP_SEQUENCE = "GROUP_ID_SEQ";
+    public static final String SPACE_SEQUENCE = "SPACE_ID_SEQ";
 
     public static final String FILTER_SEQUENCE = "FILTER_ID_SEQ";
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java
index f15eb95d6c7..cd95d31628a 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/Session.java
@@ -75,19 +75,19 @@ public final class Session extends BasicSession implements IAuthSession
     }
 
     /** Returns the home group or <code>null</code>. */
-    public final GroupPE tryGetHomeGroup()
+    public final SpacePE tryGetHomeGroup()
     {
         if (personOrNull == null)
         {
             return null;
         }
-        return personOrNull.getHomeGroup();
+        return personOrNull.getHomeSpace();
     }
 
     /** Returns home group code or <code>null</code>. */
     public final String tryGetHomeGroupCode()
     {
-        final GroupPE homeGroup = tryGetHomeGroup();
+        final SpacePE homeGroup = tryGetHomeGroup();
         if (homeGroup == null)
         {
             return null;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GroupPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java
similarity index 91%
rename from openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GroupPE.java
rename to openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java
index 83cac36f7a3..5e2eb9c3afd 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/GroupPE.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/SpacePE.java
@@ -56,15 +56,15 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.hibernate.SearchFieldConstant
  * @author Christian Ribeaud
  */
 @Entity
-@Table(name = TableNames.GROUPS_TABLE, uniqueConstraints =
+@Table(name = TableNames.SPACES_TABLE, uniqueConstraints =
     { @UniqueConstraint(columnNames =
         { ColumnNames.CODE_COLUMN, ColumnNames.DATABASE_INSTANCE_COLUMN }) })
-public final class GroupPE extends HibernateAbstractRegistrationHolder implements IIdAndCodeHolder,
-        Comparable<GroupPE>, Serializable
+public final class SpacePE extends HibernateAbstractRegistrationHolder implements IIdAndCodeHolder,
+        Comparable<SpacePE>, Serializable
 {
     private static final long serialVersionUID = IServer.VERSION;
 
-    public static final GroupPE[] EMPTY_ARRAY = new GroupPE[0];
+    public static final SpacePE[] EMPTY_ARRAY = new SpacePE[0];
 
     private transient Long id;
 
@@ -127,9 +127,9 @@ public final class GroupPE extends HibernateAbstractRegistrationHolder implement
     // IIdAndCodeHolder
     //
 
-    @SequenceGenerator(name = SequenceNames.GROUP_SEQUENCE, sequenceName = SequenceNames.GROUP_SEQUENCE, allocationSize = 1)
+    @SequenceGenerator(name = SequenceNames.SPACE_SEQUENCE, sequenceName = SequenceNames.SPACE_SEQUENCE, allocationSize = 1)
     @Id
-    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.GROUP_SEQUENCE)
+    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SequenceNames.SPACE_SEQUENCE)
     @Field(index = Index.NO, store = Store.YES)
     public final Long getId()
     {
@@ -156,11 +156,11 @@ public final class GroupPE extends HibernateAbstractRegistrationHolder implement
         {
             return true;
         }
-        if (obj instanceof GroupPE == false)
+        if (obj instanceof SpacePE == false)
         {
             return false;
         }
-        final GroupPE that = (GroupPE) obj;
+        final SpacePE that = (SpacePE) obj;
         final EqualsBuilder builder = new EqualsBuilder();
         builder.append(getCode(), that.getCode());
         builder.append(getDatabaseInstance(), that.getDatabaseInstance());
@@ -195,7 +195,7 @@ public final class GroupPE extends HibernateAbstractRegistrationHolder implement
     /**
      * If <code>null</code> values are present for <code>code</code>, then they come first.
      */
-    public final int compareTo(final GroupPE o)
+    public final int compareTo(final SpacePE o)
     {
         return AbstractIdAndCodeHolder.compare(this, o);
     }
@@ -207,7 +207,7 @@ public final class GroupPE extends HibernateAbstractRegistrationHolder implement
     private List<ProjectPE> projects = new ArrayList<ProjectPE>();
 
     @Private
-    @OneToMany(fetch = FetchType.LAZY, mappedBy = "group")
+    @OneToMany(fetch = FetchType.LAZY, mappedBy = "space")
     public List<ProjectPE> getProjects()
     {
         return projects;
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/TableNames.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/TableNames.java
index a1a5b3b2cdb..588909ac902 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/TableNames.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/TableNames.java
@@ -70,7 +70,7 @@ public final class TableNames
 
     public static final String FILE_FORMAT_TYPES_TABLE = "file_format_types";
 
-    public static final String GROUPS_TABLE = "groups";
+    public static final String SPACES_TABLE = "spaces";
 
     public static final String INVALIDATION_TABLE = "invalidations";
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ValidationMessages.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ValidationMessages.java
index 6b24e03cfcf..cde18ddd419 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ValidationMessages.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/ValidationMessages.java
@@ -142,7 +142,7 @@ public final class ValidationMessages
     public static final String FIRST_NAME_LENGTH_MESSAGE = LENGTH_PREFIX + "first name"
             + LENGTH_SUFFIX;
 
-    public static final String GROUP_NOT_NULL_MESSAGE = "Space" + CAN_NOT_BE_NULL;
+    public static final String SPACE_NOT_NULL_MESSAGE = "Space" + CAN_NOT_BE_NULL;
 
     public static final String IS_COMPLETE_NOT_NULL_MESSAGE = "Complete flag" + CAN_NOT_BE_NULL;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java
index 17c9126f521..1314f4b0a76 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/hibernate/SearchFieldConstants.java
@@ -42,7 +42,7 @@ public final class SearchFieldConstants
 
     public static final String PREFIX_PROJECT = "project" + SEPARATOR;
 
-    public static final String PREFIX_GROUP = "space" + SEPARATOR;
+    public static final String PREFIX_SPACE = "space" + SEPARATOR;
 
     public static final String PREFIX_REGISTRATOR = "registrator" + SEPARATOR;
 
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java
index 52d2377fbaa..6bc3d1fb89a 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/identifier/IdentifierHelper.java
@@ -29,7 +29,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.util.HibernateUtils;
@@ -50,7 +50,7 @@ public final class IdentifierHelper
     /**
      * Creates a {@link GroupIdentifier} from given <var>groupPE</var>.
      */
-    public final static GroupIdentifier createGroupIdentifier(final GroupPE groupPE)
+    public final static GroupIdentifier createGroupIdentifier(final SpacePE groupPE)
     {
         assert groupPE != null : "Unspecified space";
         assert groupPE.getDatabaseInstance() != null : "Any space must "
@@ -75,7 +75,7 @@ public final class IdentifierHelper
     {
         assert samplePE != null : "Unspecified sample";
         final DatabaseInstancePE databaseInstance = samplePE.getDatabaseInstance();
-        final GroupPE group = samplePE.getGroup();
+        final SpacePE group = samplePE.getSpace();
         final String sampleCode = extractCode(samplePE);
         if (databaseInstance != null)
         {
@@ -181,7 +181,7 @@ public final class IdentifierHelper
     public final static ProjectIdentifier createProjectIdentifier(final ProjectPE project)
     {
         assert project != null : "Unspecified project";
-        final GroupPE group = project.getGroup();
+        final SpacePE group = project.getSpace();
         final DatabaseInstancePE databaseInstance = group.getDatabaseInstance();
         String instanceCode =
                 databaseInstance.isOriginalSource() ? null : databaseInstance.getCode();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/AttachmentTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/AttachmentTranslator.java
index b6771878bcc..985ff2731a1 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/AttachmentTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/AttachmentTranslator.java
@@ -70,7 +70,7 @@ public final class AttachmentTranslator
         {
             ProjectPE project = (ProjectPE) holder;
             return PermlinkUtilities.createProjectAttachmentPermlinkURL(baseIndexURL, fileName,
-                    version, project.getCode(), project.getGroup().getCode());
+                    version, project.getCode(), project.getSpace().getCode());
         } else
         {
             return PermlinkUtilities.createAttachmentPermlinkURL(baseIndexURL, fileName, version,
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslator.java
index a473f65e679..f1dc2fd80f4 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslator.java
@@ -180,7 +180,7 @@ public class ExternalDataTranslator
         sample.setIdentifier(samplePE.getSampleIdentifier().toString());
         sample.setRegistrationDate(samplePE.getRegistrationDate());
         sample.setRegistrator(PersonTranslator.translate(samplePE.getRegistrator()));
-        sample.setSpace(GroupTranslator.translate(samplePE.getGroup()));
+        sample.setSpace(GroupTranslator.translate(samplePE.getSpace()));
         if (loadSampleProperties)
         {
             sample.setProperties(EntityPropertyTranslator.translate(samplePE.getProperties(),
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/GroupTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/GroupTranslator.java
index cf2ab888e54..cbf2b928f51 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/GroupTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/GroupTranslator.java
@@ -20,12 +20,12 @@ import java.util.ArrayList;
 import java.util.List;
 
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.IdentifierHelper;
 import ch.systemsx.cisd.openbis.generic.shared.util.HibernateUtils;
 
 /**
- * A {@link Space} &lt;---&gt; {@link GroupPE} translator.
+ * A {@link Space} &lt;---&gt; {@link SpacePE} translator.
  * 
  * @author Franz-Josef Elmer
  */
@@ -36,17 +36,17 @@ public final class GroupTranslator
         // Can not be instantiated.
     }
 
-    public final static List<Space> translate(final List<GroupPE> groups)
+    public final static List<Space> translate(final List<SpacePE> groups)
     {
         final List<Space> result = new ArrayList<Space>();
-        for (final GroupPE group : groups)
+        for (final SpacePE group : groups)
         {
             result.add(GroupTranslator.translate(group));
         }
         return result;
     }
 
-    public static Space translate(final GroupPE group)
+    public static Space translate(final SpacePE group)
     {
         if (group == null)
         {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ProjectTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ProjectTranslator.java
index dbab2b0987f..457ea9f2260 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ProjectTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/ProjectTranslator.java
@@ -61,7 +61,7 @@ public final class ProjectTranslator
         result.setModificationDate(project.getModificationDate());
         result.setCode(project.getCode());
         result.setDescription(project.getDescription());
-        result.setSpace(GroupTranslator.translate(project.getGroup()));
+        result.setSpace(GroupTranslator.translate(project.getSpace()));
         result.setProjectLeader(PersonTranslator.translate(project.getProjectLeader()));
         result.setRegistrator(PersonTranslator.translate(project.getRegistrator()));
         result.setRegistrationDate(project.getRegistrationDate());
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/RoleAssignmentTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/RoleAssignmentTranslator.java
index 5f7eb09b6b9..6409fd7a7dc 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/RoleAssignmentTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/RoleAssignmentTranslator.java
@@ -53,7 +53,7 @@ public final class RoleAssignmentTranslator
             return null;
         }
         final RoleAssignment result = new RoleAssignment();
-        result.setSpace(GroupTranslator.translate(role.getGroup()));
+        result.setSpace(GroupTranslator.translate(role.getSpace()));
         result.setInstance(DatabaseInstanceTranslator.translate(role.getDatabaseInstance()));
         result.setPerson(PersonTranslator.translate(role.getPerson()));
         result.setAuthorizationGroup(AuthorizationGroupTranslator.translate(role
@@ -65,7 +65,7 @@ public final class RoleAssignmentTranslator
     private final static RoleWithHierarchy getRoleCode(final RoleAssignmentPE role)
     {
         RoleLevel roleLevel = null;
-        if (role.getGroup() != null)
+        if (role.getSpace() != null)
         {
             roleLevel = RoleLevel.SPACE;
         }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/SampleTranslator.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/SampleTranslator.java
index 72ce5ff7d63..a47a91604d0 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/SampleTranslator.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/translator/SampleTranslator.java
@@ -97,7 +97,7 @@ public final class SampleTranslator
                 new HashMap<PropertyTypePE, PropertyType>()));
         if (withDetails)
         {
-            result.setSpace(GroupTranslator.translate(samplePE.getGroup()));
+            result.setSpace(GroupTranslator.translate(samplePE.getSpace()));
             result.setDatabaseInstance(DatabaseInstanceTranslator.translate(samplePE
                     .getDatabaseInstance()));
             result.setRegistrator(PersonTranslator.translate(samplePE.getRegistrator()));
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SpaceCodeHelper.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SpaceCodeHelper.java
index 9ed126c90bb..16e7d4a9a53 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SpaceCodeHelper.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/util/SpaceCodeHelper.java
@@ -16,7 +16,7 @@
 
 package ch.systemsx.cisd.openbis.generic.shared.util;
 
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.exception.UndefinedSpaceException;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SpaceIdentifier;
@@ -55,13 +55,13 @@ public class SpaceCodeHelper
     /**
      * Tries to find out the space.
      * <p>
-     * If not specified in given {@link GroupPE} the real space must be specified as home space in
+     * If not specified in given {@link SpacePE} the real space must be specified as home space in
      * given {@link PersonPE}.
      * </p>
      * 
      * @throws UndefinedSpaceException if no space could be found.
      */
-    public final static String getSpaceCode(final PersonPE person, final GroupPE group)
+    public final static String getSpaceCode(final PersonPE person, final SpacePE group)
             throws UndefinedSpaceException
     {
         return getSpaceCode(person, group.getCode());
@@ -81,7 +81,7 @@ public class SpaceCodeHelper
     {
         if (isHomeSpace(spaceCode))
         {
-            final GroupPE homeGroup = person.getHomeGroup();
+            final SpacePE homeGroup = person.getHomeSpace();
             if (homeGroup == null)
             {
                 throw new UndefinedSpaceException();
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java
index c0f70836349..8b5f28f30db 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/server/GenericServer.java
@@ -546,7 +546,7 @@ public final class GenericServer extends AbstractServer<IGenericServer> implemen
             for (SampleIdentifier si : sampleIdentifiers)
             {
                 IdentifierHelper
-                        .fillAndCheckGroup(si, experiment.getProject().getGroup().getCode());
+                        .fillAndCheckGroup(si, experiment.getProject().getSpace().getCode());
             }
             for (SampleIdentifier si : sampleIdentifiers)
             {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java
index 459b2e8aa38..81717ef7b30 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/server/QueryDatabaseDefinitionProvider.java
@@ -36,7 +36,7 @@ import ch.systemsx.cisd.dbmigration.SimpleDatabaseConfigurationContext;
 import ch.systemsx.cisd.openbis.generic.server.ComponentNames;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.plugin.query.shared.DatabaseDefinition;
 import ch.systemsx.cisd.openbis.plugin.query.shared.IQueryDatabaseDefinitionProvider;
 import ch.systemsx.cisd.openbis.plugin.query.shared.ResourceNames;
@@ -112,11 +112,11 @@ public class QueryDatabaseDefinitionProvider implements IQueryDatabaseDefinition
                                 + "' label is used more than once.");
             }
             labels.add(label);
-            GroupPE dataSpaceOrNull = null;
+            SpacePE dataSpaceOrNull = null;
             if (dataSpaceOrNullString != null)
             {
                 dataSpaceOrNull =
-                        daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(
+                        daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(
                                 dataSpaceOrNullString, daoFactory.getHomeDatabaseInstance());
                 if (dataSpaceOrNull == null)
                 {
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/DatabaseDefinition.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/DatabaseDefinition.java
index c3f784c1cea..cf0ce7cbf35 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/DatabaseDefinition.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/DatabaseDefinition.java
@@ -18,7 +18,7 @@ package ch.systemsx.cisd.openbis.plugin.query.shared;
 
 import ch.systemsx.cisd.dbmigration.SimpleDatabaseConfigurationContext;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * @author Franz-Josef Elmer
@@ -29,14 +29,14 @@ public class DatabaseDefinition
 
     private final String label;
 
-    private final GroupPE dataSpaceOrNull;
+    private final SpacePE dataSpaceOrNull;
 
     private final RoleWithHierarchy creatorMinimalRole;
 
     private final SimpleDatabaseConfigurationContext configurationContext;
 
     public DatabaseDefinition(SimpleDatabaseConfigurationContext configurationContext, String key,
-            String label, RoleWithHierarchy creatorMinimalRole, GroupPE dataSpaceOrNull)
+            String label, RoleWithHierarchy creatorMinimalRole, SpacePE dataSpaceOrNull)
     {
         assert key != null;
         assert label != null;
@@ -64,7 +64,7 @@ public class DatabaseDefinition
         return creatorMinimalRole;
     }
 
-    public GroupPE tryGetDataSpace()
+    public SpacePE tryGetDataSpace()
     {
         return dataSpaceOrNull;
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java
index ee6765fb625..566f3b8fee3 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/AuthorizationChecker.java
@@ -23,7 +23,7 @@ import ch.systemsx.cisd.openbis.generic.server.authorization.DefaultAccessContro
 import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleLevel;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 
 /**
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 public class AuthorizationChecker implements IAuthorizationChecker
 {
 
-    public boolean isAuthorized(PersonPE person, GroupPE dataSpaceOrNull, RoleWithHierarchy minimalRole)
+    public boolean isAuthorized(PersonPE person, SpacePE dataSpaceOrNull, RoleWithHierarchy minimalRole)
     {
         final Set<RoleWithHierarchy> requiredRoles = minimalRole.getRoles();
         if (person != null)
@@ -60,7 +60,7 @@ public class AuthorizationChecker implements IAuthorizationChecker
     }
 
     private static boolean isSpaceMatching(List<RoleWithIdentifier> userRoles,
-            final GroupPE requiredSpace)
+            final SpacePE requiredSpace)
     {
 
         for (final RoleWithIdentifier role : userRoles)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/IAuthorizationChecker.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/IAuthorizationChecker.java
index f6606434574..c1295b5ab13 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/IAuthorizationChecker.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/IAuthorizationChecker.java
@@ -17,7 +17,7 @@
 package ch.systemsx.cisd.openbis.plugin.query.shared.authorization;
 
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 
 /**
@@ -27,5 +27,5 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
  */
 public interface IAuthorizationChecker
 {
-    boolean isAuthorized(PersonPE person, GroupPE dataSpaceOrNull, RoleWithHierarchy minimalRole);
+    boolean isAuthorized(PersonPE person, SpacePE dataSpaceOrNull, RoleWithHierarchy minimalRole);
 }
\ No newline at end of file
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessController.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessController.java
index 9df6251608f..abc46bce603 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessController.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessController.java
@@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.server.authorization.AuthorizationAdviso
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModel;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
 import ch.systemsx.cisd.openbis.plugin.query.shared.DatabaseDefinition;
@@ -53,7 +53,7 @@ public class QueryAccessController
     {
         DatabaseDefinition database = definitionsByDbKey.get(dbKey);
         PersonPE person = session.tryGetPerson();
-        GroupPE dataSpaceOrNull = database.tryGetDataSpace();
+        SpacePE dataSpaceOrNull = database.tryGetDataSpace();
         RoleWithHierarchy minimalRole = database.getCreatorMinimalRole();
 
         checkAuthorization(session, operation, database, person, dataSpaceOrNull, minimalRole);
@@ -63,14 +63,14 @@ public class QueryAccessController
     {
         DatabaseDefinition database = definitionsByDbKey.get(dbKey);
         PersonPE person = session.tryGetPerson();
-        GroupPE dataSpaceOrNull = database.tryGetDataSpace();
+        SpacePE dataSpaceOrNull = database.tryGetDataSpace();
         RoleWithHierarchy minimalRole = RoleWithHierarchy.SPACE_OBSERVER;
 
         checkAuthorization(session, "perform", database, person, dataSpaceOrNull, minimalRole);
     }
 
     private static void checkAuthorization(Session session, String operation,
-            DatabaseDefinition database, PersonPE person, GroupPE dataSpaceOrNull,
+            DatabaseDefinition database, PersonPE person, SpacePE dataSpaceOrNull,
             RoleWithHierarchy minimalRole)
     {
         if (isAuthorized(person, dataSpaceOrNull, minimalRole) == false)
@@ -82,13 +82,13 @@ public class QueryAccessController
         }
     }
 
-    static boolean isAuthorized(PersonPE person, GroupPE dataSpaceOrNull, RoleWithHierarchy minimalRole)
+    static boolean isAuthorized(PersonPE person, SpacePE dataSpaceOrNull, RoleWithHierarchy minimalRole)
     {
         return new AuthorizationChecker().isAuthorized(person, dataSpaceOrNull, minimalRole);
     }
 
     private static String createErrorMessage(String operation, String userName,
-            GroupPE dataSpaceOrNull, RoleWithHierarchy minimalRole, String database)
+            SpacePE dataSpaceOrNull, RoleWithHierarchy minimalRole, String database)
     {
         String minimalRoleDescription = minimalRole.name();
         if (dataSpaceOrNull != null)
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java
index 71afaf9cb01..fa86ddaa30f 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoader.java
@@ -23,7 +23,7 @@ import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * {@link IGroupLoader} for data sets.
@@ -40,13 +40,13 @@ class DataSetGroupLoader implements IGroupLoader
         this.dao = dao;
     }
 
-    public Map<String, GroupPE> loadGroups(Set<String> keys)
+    public Map<String, SpacePE> loadGroups(Set<String> keys)
     {
-        Map<String, GroupPE> map = new HashMap<String, GroupPE>();
+        Map<String, SpacePE> map = new HashMap<String, SpacePE>();
         List<ExternalDataPE> data = dao.listByCode(keys);
         for (ExternalDataPE d : data)
         {
-            map.put(d.getCode(), d.getExperiment().getProject().getGroup());
+            map.put(d.getCode(), d.getExperiment().getProject().getSpace());
         }
         return map;
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java
index ad7fd6a0820..75aadfee631 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoader.java
@@ -23,7 +23,7 @@ import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * {@link IGroupLoader} for experiments.
@@ -40,13 +40,13 @@ class ExperimentGroupLoader implements IGroupLoader
         this.dao = dao;
     }
 
-    public Map<String, GroupPE> loadGroups(Set<String> keys)
+    public Map<String, SpacePE> loadGroups(Set<String> keys)
     {
-        Map<String, GroupPE> map = new HashMap<String, GroupPE>();
+        Map<String, SpacePE> map = new HashMap<String, SpacePE>();
         List<ExperimentPE> experiments = dao.listByPermID(keys);
         for (ExperimentPE e : experiments)
         {
-            map.put(e.getPermId(), e.getProject().getGroup());
+            map.put(e.getPermId(), e.getProject().getSpace());
         }
         return map;
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/IGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/IGroupLoader.java
index 98e0565e9cd..989ffeaf1b0 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/IGroupLoader.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/IGroupLoader.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.query.shared.authorization.result_filter
 import java.util.Map;
 import java.util.Set;
 
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * Loads the groups connected with entities described by given keys.
@@ -28,5 +28,5 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
  */
 public interface IGroupLoader
 {
-    Map<String, GroupPE> loadGroups(Set<String> keys);
+    Map<String, SpacePE> loadGroups(Set<String> keys);
 }
\ No newline at end of file
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilter.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilter.java
index 9b6816686e2..30854425566 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilter.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilter.java
@@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModel;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelColumnHeader;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelRow;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.plugin.query.shared.authorization.AuthorizationChecker;
 import ch.systemsx.cisd.openbis.plugin.query.shared.authorization.IAuthorizationChecker;
@@ -78,7 +78,7 @@ public class QueryResultFilter
     {
         List<Integer> columnsToFilter = getColumnsToFilter(table, kind);
         Set<String> entityIdentifiers = getValues(table, columnsToFilter);
-        Map<String, GroupPE> entitySpaces = loadGroups(entityIdentifiers, kind);
+        Map<String, SpacePE> entitySpaces = loadGroups(entityIdentifiers, kind);
         Iterator<TableModelRow> rowIterator = table.getRows().iterator();
         rowLoop: while (rowIterator.hasNext())
         {
@@ -129,7 +129,7 @@ public class QueryResultFilter
         return columns;
     }
 
-    private Map<String, GroupPE> loadGroups(Set<String> values, EntityKind kind)
+    private Map<String, SpacePE> loadGroups(Set<String> values, EntityKind kind)
     {
         return groupLoaderFactory.create(kind).loadGroups(values);
     }
diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java
index 091c9d8ab93..25c73969475 100644
--- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java
+++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoader.java
@@ -22,7 +22,7 @@ import java.util.Map;
 import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISampleDAO;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 
 /**
@@ -40,13 +40,13 @@ class SampleGroupLoader implements IGroupLoader
         this.dao = dao;
     }
 
-    public Map<String, GroupPE> loadGroups(Set<String> keys)
+    public Map<String, SpacePE> loadGroups(Set<String> keys)
     {
-        Map<String, GroupPE> map = new HashMap<String, GroupPE>();
+        Map<String, SpacePE> map = new HashMap<String, SpacePE>();
         List<SamplePE> samples = dao.listByPermID(keys);
         for (SamplePE s : samples)
         {
-            map.put(s.getPermId(), s.getGroup());
+            map.put(s.getPermId(), s.getSpace());
         }
         return map;
     }
diff --git a/openbis/source/java/hibernateContext.xml b/openbis/source/java/hibernateContext.xml
index f2deb22b00f..fb44964de10 100644
--- a/openbis/source/java/hibernateContext.xml
+++ b/openbis/source/java/hibernateContext.xml
@@ -22,7 +22,7 @@
                 <value>ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE</value>
                 <value>ch.systemsx.cisd.openbis.generic.shared.dto.DataTypePE</value>
 
-                <value>ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE</value>
+                <value>ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE</value>
                 <value>ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE</value>
                 <value>ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE</value>
                 <value>ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE</value>
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java
index ebe680d6bc6..29e110e64a7 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/CommonServerTest.java
@@ -71,7 +71,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
@@ -293,18 +293,18 @@ public final class CommonServerTest extends AbstractServerTestCase
     {
         final PersonPE person = CommonTestUtils.createPersonFromPrincipal(PRINCIPAL);
         final DatabaseInstanceIdentifier identifier = DatabaseInstanceIdentifier.createHome();
-        final GroupPE g1 = CommonTestUtils.createGroup("g1", homeDatabaseInstance);
-        final GroupPE g2 = CommonTestUtils.createGroup("g2", homeDatabaseInstance);
+        final SpacePE g1 = CommonTestUtils.createGroup("g1", homeDatabaseInstance);
+        final SpacePE g2 = CommonTestUtils.createGroup("g2", homeDatabaseInstance);
         final Session session = createSession(CommonTestUtils.USER_ID);
         session.setPerson(person);
-        person.setHomeGroup(g1);
+        person.setHomeSpace(g1);
         g1.setId(42L);
         context.checking(new Expectations()
             {
                 {
                     allowing(sessionManager).getSession(SESSION_TOKEN);
                     will(returnValue(session));
-                    one(groupDAO).listGroups(homeDatabaseInstance);
+                    one(groupDAO).listSpaces(homeDatabaseInstance);
                     will(returnValue(Arrays.asList(g1, g2)));
                 }
             });
@@ -1394,7 +1394,7 @@ public final class CommonServerTest extends AbstractServerTestCase
     public void testChangeUserHomeGroup()
     {
         final TechId groupId = CommonTestUtils.TECH_ID;
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setId(groupId.getId());
         final PersonPE person = new PersonPE();
         context.checking(new Expectations()
@@ -1412,8 +1412,8 @@ public final class CommonServerTest extends AbstractServerTestCase
 
         createServer().changeUserHomeSpace(SESSION_TOKEN, groupId);
 
-        assertSame(group, person.getHomeGroup());
-        assertSame(groupId.getId(), person.getHomeGroup().getId());
+        assertSame(group, person.getHomeSpace());
+        assertSame(groupId.getId(), person.getHomeSpace().getId());
 
         context.assertIsSatisfied();
     }
@@ -1422,10 +1422,10 @@ public final class CommonServerTest extends AbstractServerTestCase
     public void testChangeUserHomeGroupToNull()
     {
         final TechId groupId = CommonTestUtils.TECH_ID;
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setId(groupId.getId());
         final PersonPE person = new PersonPE();
-        person.setHomeGroup(group);
+        person.setHomeSpace(group);
         context.checking(new Expectations()
             {
                 {
@@ -1438,7 +1438,7 @@ public final class CommonServerTest extends AbstractServerTestCase
 
         createServer().changeUserHomeSpace(SESSION_TOKEN, null);
 
-        assertNull(person.getHomeGroup());
+        assertNull(person.getHomeSpace());
 
         context.assertIsSatisfied();
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
index d8ec3006f13..7772fbcb719 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/ETLServiceTest.java
@@ -647,7 +647,7 @@ public class ETLServiceTest extends AbstractServerTestCase
                     one(sampleBO).getSample();
                     SamplePE sample = new SamplePE();
                     sample.setCode("s2");
-                    sample.setGroup(createGroup("G1"));
+                    sample.setSpace(createGroup("G1"));
                     sample.setExperiment(experiment);
                     will(returnValue(sample));
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java
index 1e4e5c7750b..629e3102e46 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/api/v1/GeneralInformationServiceTest.java
@@ -49,7 +49,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExperimentType;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IEntityProperty;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -141,17 +141,17 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase
                             createUserAssignment("user1", "s1", RoleCode.USER);
                     will(returnValue(Arrays.asList(assignment1, assignment2, assignment3)));
 
-                    one(groupDAO).listGroups(daoFactory.getHomeDatabaseInstance());
-                    List<GroupPE> spaces = createSpaces("s1", "s2", "s3");
+                    one(groupDAO).listSpaces(daoFactory.getHomeDatabaseInstance());
+                    List<SpacePE> spaces = createSpaces("s1", "s2", "s3");
                     will(returnValue(spaces));
 
                     one(projectDAO).listProjects(spaces.get(0));
                     ProjectPE a = new ProjectPE();
                     a.setCode("a");
-                    a.setGroup(spaces.get(0));
+                    a.setSpace(spaces.get(0));
                     ProjectPE b = new ProjectPE();
                     b.setCode("b");
-                    b.setGroup(spaces.get(0));
+                    b.setSpace(spaces.get(0));
                     will(returnValue(Arrays.asList(a, b)));
 
                     one(projectDAO).listProjects(spaces.get(1));
@@ -160,7 +160,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase
                     one(projectDAO).listProjects(spaces.get(2));
                     ProjectPE c = new ProjectPE();
                     c.setCode("c");
-                    c.setGroup(spaces.get(0));
+                    c.setSpace(spaces.get(0));
                     will(returnValue(Arrays.asList(c)));
                 }
             });
@@ -300,14 +300,14 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase
                             createUserAssignment("user1", "SPACE-2", RoleCode.ADMIN);
                     will(returnValue(Arrays.asList(assignment0, assignment1, assignment2)));
 
-                    one(groupDAO).listGroups(daoFactory.getHomeDatabaseInstance());
-                    List<GroupPE> spaces = createSpaces("SPACE-1", "SPACE-2");
+                    one(groupDAO).listSpaces(daoFactory.getHomeDatabaseInstance());
+                    List<SpacePE> spaces = createSpaces("SPACE-1", "SPACE-2");
                     will(returnValue(spaces));
 
                     one(projectDAO).listProjects(spaces.get(0));
                     ProjectPE project1 = new ProjectPE();
                     project1.setCode("PROJECT-1");
-                    project1.setGroup(spaces.get(0));
+                    project1.setSpace(spaces.get(0));
                     will(returnValue(Collections.singletonList(project1)));
 
                     one(projectDAO).listProjects(spaces.get(1));
@@ -397,7 +397,7 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase
         RoleAssignmentPE assignment = new RoleAssignmentPE();
         if (spaceCodeOrNull != null)
         {
-            assignment.setGroup(createGroup(spaceCodeOrNull));
+            assignment.setSpace(createGroup(spaceCodeOrNull));
         }
         assignment.setRole(roleCode);
         PersonPE person = new PersonPE();
@@ -406,9 +406,9 @@ public class GeneralInformationServiceTest extends AbstractServerTestCase
         return assignment;
     }
 
-    private List<GroupPE> createSpaces(String... codes)
+    private List<SpacePE> createSpaces(String... codes)
     {
-        List<GroupPE> list = new ArrayList<GroupPE>();
+        List<SpacePE> list = new ArrayList<SpacePE>();
         for (String code : codes)
         {
             list.add(createGroup(code));
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java
index 39dbaecd212..50d9015b376 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/AuthorizationTestUtil.java
@@ -34,11 +34,11 @@ import org.springframework.beans.factory.config.BeanPostProcessor;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IAuthorizationDAOFactory;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDatabaseInstanceDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.dto.CodeConverter;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IAuthSession;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -63,7 +63,7 @@ public final class AuthorizationTestUtil
      * </p>
      */
     public final static <T> T createAndPrepareAuthorizationProxy(final Class<T> proxyInterface,
-            final Mockery context, final List<GroupPE> groups, final String homeDbCode,
+            final Mockery context, final List<SpacePE> groups, final String homeDbCode,
             final String dbCode)
     {
         final IAuthorizationDAOFactory daoFactory =
@@ -74,7 +74,7 @@ public final class AuthorizationTestUtil
         final DatabaseInstancePE db = createDatabaseInstance(dbCode);
         final IDatabaseInstanceDAO databaseInstanceDAO =
                 context.mock(IDatabaseInstanceDAO.class, "authorization IDatabaseInstanceDAO mock");
-        final IGroupDAO groupDAO = context.mock(IGroupDAO.class, "authorization IGroupDAO mock");
+        final ISpaceDAO groupDAO = context.mock(ISpaceDAO.class, "authorization IGroupDAO mock");
         context.checking(new Expectations()
             {
                 {
@@ -88,10 +88,10 @@ public final class AuthorizationTestUtil
                             dbCode.toUpperCase());
                     will(returnValue(db));
 
-                    allowing(daoFactory).getGroupDAO();
+                    allowing(daoFactory).getSpaceDAO();
                     will(returnValue(groupDAO));
 
-                    allowing(groupDAO).listGroups();
+                    allowing(groupDAO).listSpaces();
                     will(returnValue(groups));
                 }
             });
@@ -105,7 +105,7 @@ public final class AuthorizationTestUtil
      * </p>
      */
     public final static <T> T prepareAuthorizationProxy(final T proxyInstance,
-            final Mockery context, final List<GroupPE> groups, final String homeDbCode,
+            final Mockery context, final List<SpacePE> groups, final String homeDbCode,
             final String... otherDatabasesCodes)
     {
         final IAuthorizationDAOFactory daoFactory =
@@ -186,7 +186,7 @@ public final class AuthorizationTestUtil
     // ----------------
 
     private final static void prepareAuthorizationExpectations(final Mockery context,
-            final IAuthorizationDAOFactory daoFactory, final List<GroupPE> groups,
+            final IAuthorizationDAOFactory daoFactory, final List<SpacePE> groups,
             final String homeDbCode, final String... otherDatabasesCodes)
     {
         final DatabaseInstancePE homeDb = createDatabaseInstance(homeDbCode);
@@ -200,12 +200,12 @@ public final class AuthorizationTestUtil
     }
 
     private final static void prepareAuthorizationCalls(final Mockery context,
-            final IAuthorizationDAOFactory daoFactory, final List<GroupPE> groups,
+            final IAuthorizationDAOFactory daoFactory, final List<SpacePE> groups,
             final DatabaseInstancePE homeDb, final List<DatabaseInstancePE> databases)
     {
         final IDatabaseInstanceDAO databaseInstanceDAO =
                 context.mock(IDatabaseInstanceDAO.class, "authorizarion IDatabaseInstanceDAO mock");
-        final IGroupDAO groupDAO = context.mock(IGroupDAO.class, "authorizarion IGroupDAO mock");
+        final ISpaceDAO groupDAO = context.mock(ISpaceDAO.class, "authorizarion IGroupDAO mock");
         context.checking(new Expectations()
             {
                 {
@@ -218,10 +218,10 @@ public final class AuthorizationTestUtil
                     allowing(daoFactory).getHomeDatabaseInstance();
                     will(returnValue(homeDb));
 
-                    allowing(daoFactory).getGroupDAO();
+                    allowing(daoFactory).getSpaceDAO();
                     will(returnValue(groupDAO));
 
-                    allowing(groupDAO).listGroups();
+                    allowing(groupDAO).listSpaces();
                     will(returnValue(groups));
                 }
             });
@@ -251,7 +251,7 @@ public final class AuthorizationTestUtil
 
                 public String tryGetHomeGroupCode()
                 {
-                    GroupPE homeGroup = person.getHomeGroup();
+                    SpacePE homeGroup = person.getHomeSpace();
                     return homeGroup == null ? null : homeGroup.getCode();
                 }
 
@@ -277,8 +277,8 @@ public final class AuthorizationTestUtil
     {
         final RoleAssignmentPE roleAssignment = new RoleAssignmentPE();
         roleAssignment.setRole(roleCode);
-        final GroupPE group = createGroup(instanceCode, groupCode);
-        roleAssignment.setGroup(group);
+        final SpacePE group = createGroup(instanceCode, groupCode);
+        roleAssignment.setSpace(group);
         return roleAssignment;
     }
 
@@ -291,9 +291,9 @@ public final class AuthorizationTestUtil
         return databaseInstance;
     }
 
-    public final static GroupPE createGroup(final String dbCode, final String groupCode)
+    public final static SpacePE createGroup(final String dbCode, final String groupCode)
     {
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setCode(CodeConverter.tryToDatabase(groupCode));
         group.setDatabaseInstance(createDatabaseInstance(dbCode));
         return group;
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessControllerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessControllerTest.java
index bbcaf75b0e2..facf6858c04 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessControllerTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/authorization/DefaultAccessControllerTest.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.RolesAll
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IAuthSession;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 
@@ -55,12 +55,12 @@ public final class DefaultAccessControllerTest
 
         final RoleAssignmentPE groupRole = new RoleAssignmentPE();
 
-        final GroupPE groupPE = new GroupPE();
+        final SpacePE groupPE = new SpacePE();
         groupPE.setCode("CISD");
         final DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode("DB2");
         groupPE.setDatabaseInstance(databaseInstancePE);
-        groupRole.setGroup(groupPE);
+        groupRole.setSpace(groupPE);
         groupRole.setRole(RoleCode.USER);
         roleAssignments.add(groupRole);
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/ManagerTestTool.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/ManagerTestTool.java
index c046e4dead9..9a054ea9bb0 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/ManagerTestTool.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/ManagerTestTool.java
@@ -30,10 +30,10 @@ import ch.systemsx.cisd.authentication.Principal;
 import ch.systemsx.cisd.common.db.SQLStateUtils;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IAuthorizationDAOFactory;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDatabaseInstanceDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPersonDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
@@ -49,9 +49,9 @@ public class ManagerTestTool
 
     public static final DatabaseInstancePE EXAMPLE_DATABASE_INSTANCE = createDatabaseInstance();
 
-    public static final GroupPE EXAMPLE_GROUP = createGroup();
+    public static final SpacePE EXAMPLE_GROUP = createGroup();
 
-    public static final GroupPE EXAMPLE_GROUP2 = createGroup2();
+    public static final SpacePE EXAMPLE_GROUP2 = createGroup2();
 
     public static final PersonPE EXAMPLE_PERSON = createPerson();
 
@@ -80,23 +80,23 @@ public class ManagerTestTool
      * Prepares mock GroupDAO with {@link #EXAMPLE_GROUP};
      */
     public final static void prepareGroupDAO(final Mockery context,
-            final IAuthorizationDAOFactory daoFactory, final IGroupDAO groupDAO)
+            final IAuthorizationDAOFactory daoFactory, final ISpaceDAO groupDAO)
     {
         InvocationExpectationBuilder builder = new InvocationExpectationBuilder();
-        builder.of(daoFactory).getGroupDAO();
+        builder.of(daoFactory).getSpaceDAO();
         context.addExpectation(builder.toExpectation(new ReturnValueAction(groupDAO)));
 
         builder = new InvocationExpectationBuilder();
-        builder.of(groupDAO).listGroups();
+        builder.of(groupDAO).listSpaces();
         context.addExpectation(builder.toExpectation(new ReturnValueAction(Arrays
                 .asList(EXAMPLE_GROUP))));
     }
 
     public final static void prepareFindGroup(final Expectations expectations,
-            final IAuthorizationDAOFactory daoFactory, final IGroupDAO groupDAO,
+            final IAuthorizationDAOFactory daoFactory, final ISpaceDAO groupDAO,
             final IDatabaseInstanceDAO databaseInstanceDAO)
     {
-        expectations.allowing(daoFactory).getGroupDAO();
+        expectations.allowing(daoFactory).getSpaceDAO();
         expectations.will(Expectations.returnValue(groupDAO));
 
         expectations.allowing(daoFactory).getDatabaseInstanceDAO();
@@ -106,13 +106,13 @@ public class ManagerTestTool
                 EXAMPLE_DATABASE_INSTANCE.getCode().toUpperCase());
         expectations.will(Expectations.returnValue(EXAMPLE_DATABASE_INSTANCE));
 
-        expectations.allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
+        expectations.allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
                 EXAMPLE_GROUP.getCode().toUpperCase(), EXAMPLE_DATABASE_INSTANCE);
         expectations.will(Expectations.returnValue(EXAMPLE_GROUP));
     }
 
-    public static GroupPE prepareFindGroup(final Expectations exp, final String groupCode,
-            final IAuthorizationDAOFactory daoFactory, final IGroupDAO groupDAO)
+    public static SpacePE prepareFindGroup(final Expectations exp, final String groupCode,
+            final IAuthorizationDAOFactory daoFactory, final ISpaceDAO groupDAO)
     {
         exp.allowing(daoFactory).getHomeDatabaseInstance();
         DatabaseInstancePE db = new DatabaseInstancePE();
@@ -121,10 +121,10 @@ public class ManagerTestTool
         db.setId(dbId);
         exp.will(Expectations.returnValue(db));
 
-        exp.allowing(daoFactory).getGroupDAO();
+        exp.allowing(daoFactory).getSpaceDAO();
         exp.will(Expectations.returnValue(groupDAO));
 
-        exp.allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(groupCode.toUpperCase(), db);
+        exp.allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(groupCode.toUpperCase(), db);
         exp.will(Expectations.returnValue(ManagerTestTool.EXAMPLE_GROUP));
         return ManagerTestTool.EXAMPLE_GROUP;
     }
@@ -172,7 +172,7 @@ public class ManagerTestTool
     private static PersonPE createExamplePersonWithGroup()
     {
         final PersonPE person = createPerson();
-        person.setHomeGroup(createGroup());
+        person.setHomeSpace(createGroup());
         return person;
     }
 
@@ -188,18 +188,18 @@ public class ManagerTestTool
         return person;
     }
 
-    public final static GroupPE createGroup()
+    public final static SpacePE createGroup()
     {
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setDatabaseInstance(EXAMPLE_DATABASE_INSTANCE);
         group.setCode("MY_GROUP");
         group.setId(4242L);
         return group;
     }
 
-    public final static GroupPE createGroup2()
+    public final static SpacePE createGroup2()
     {
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setDatabaseInstance(EXAMPLE_DATABASE_INSTANCE);
         group.setCode("MY_GROUP2");
         group.setId(1984L);
@@ -209,7 +209,7 @@ public class ManagerTestTool
     public final static ProjectPE createProject()
     {
         final ProjectPE project = new ProjectPE();
-        project.setGroup(EXAMPLE_GROUP);
+        project.setSpace(EXAMPLE_GROUP);
         project.setCode("MY_GREAT_PROJECT");
         project.setId(314L);
         return project;
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
index bd1e2238ecf..6609f459d47 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/AbstractBOTest.java
@@ -36,7 +36,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IFileFormatTypeDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGridCustomFilterDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.ILocatorTypeDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IMaterialDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPersonDAO;
@@ -65,7 +65,7 @@ public abstract class AbstractBOTest extends AssertJUnit
 
     protected IScriptFactory scriptFactory;
 
-    protected IGroupDAO groupDAO;
+    protected ISpaceDAO groupDAO;
 
     protected IScriptDAO scriptDAO;
 
@@ -121,7 +121,7 @@ public abstract class AbstractBOTest extends AssertJUnit
         context = new Mockery();
         daoFactory = context.mock(IDAOFactory.class);
         scriptFactory = context.mock(IScriptFactory.class);
-        groupDAO = context.mock(IGroupDAO.class);
+        groupDAO = context.mock(ISpaceDAO.class);
         relationshipTypeDAO = context.mock(IRelationshipTypeDAO.class);
         experimentDAO = context.mock(IExperimentDAO.class);
         projectDAO = context.mock(IProjectDAO.class);
@@ -152,7 +152,7 @@ public abstract class AbstractBOTest extends AssertJUnit
                     allowing(daoFactory).getSessionFactory();
                     allowing(daoFactory).getDatabaseInstanceDAO();
                     will(returnValue(databaseInstanceDAO));
-                    allowing(daoFactory).getGroupDAO();
+                    allowing(daoFactory).getSpaceDAO();
                     will(returnValue(groupDAO));
                     allowing(daoFactory).getVocabularyDAO();
                     will(returnValue(vocabularyDAO));
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBOTest.java
index 4033ba6771d..747e5631b41 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExperimentBOTest.java
@@ -47,7 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPropertyPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePropertyTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -449,9 +449,9 @@ public final class ExperimentBOTest extends AbstractBOTest
         ExperimentIdentifier identifier = CommonTestUtils.createExperimentIdentifier();
         ExperimentPE exp = CommonTestUtils.createExperiment(identifier);
 
-        GroupPE group = CommonTestUtils.createGroup(identifier);
+        SpacePE group = CommonTestUtils.createGroup(identifier);
         SamplePE assignedSample = createSampleWithCode("assignedSample");
-        assignedSample.setGroup(group);
+        assignedSample.setSpace(group);
         exp.setSamples(Arrays.asList(assignedSample));
 
         prepareLoadExperimentByIdentifier(identifier, exp);
@@ -464,12 +464,12 @@ public final class ExperimentBOTest extends AbstractBOTest
         prepareTryFindProject(newProjectIdentifier, newProject);
 
         assertFalse(newProject.equals(exp.getProject()));
-        assertFalse(newProject.getGroup().equals(assignedSample.getGroup()));
+        assertFalse(newProject.getSpace().equals(assignedSample.getSpace()));
 
         expBO.updateProject(newProjectIdentifier);
 
         assertEquals(newProject, exp.getProject());
-        assertEquals(newProject.getGroup(), assignedSample.getGroup());
+        assertEquals(newProject.getSpace(), assignedSample.getSpace());
     }
 
     @Test
@@ -487,7 +487,7 @@ public final class ExperimentBOTest extends AbstractBOTest
         exp.setSamples(Arrays.asList(untouchedSample, unassignedSample));
 
         prepareLoadExperimentByIdentifier(identifier, exp);
-        prepareTryFindSample(exp.getProject().getGroup(), assignedSample.getCode(), assignedSample);
+        prepareTryFindSample(exp.getProject().getSpace(), assignedSample.getCode(), assignedSample);
         prepareNoDatasetsFound();
         final ExperimentBO expBO = loadExperiment(identifier, exp);
 
@@ -521,7 +521,7 @@ public final class ExperimentBOTest extends AbstractBOTest
         assert exp.getSamples().size() == 0 : "no samples expected";
 
         prepareLoadExperimentByIdentifier(identifier, exp);
-        prepareTryFindSample(exp.getProject().getGroup(), assignedSample.getCode(), assignedSample);
+        prepareTryFindSample(exp.getProject().getSpace(), assignedSample.getCode(), assignedSample);
 
         final ExperimentBO expBO = loadExperiment(identifier, exp);
 
@@ -552,7 +552,7 @@ public final class ExperimentBOTest extends AbstractBOTest
         prepareLoadExperimentByIdentifier(identifier, exp);
         final ExperimentBO expBO = loadExperiment(identifier, exp);
 
-        prepareTryFindSample(exp.getProject().getGroup(), unknownSampleCode, null);
+        prepareTryFindSample(exp.getProject().getSpace(), unknownSampleCode, null);
         String errorMsg =
                 "Samples with following codes do not exist in the space 'HOME_GROUP': '[unknownSampleCode]'.";
         try
@@ -654,13 +654,13 @@ public final class ExperimentBOTest extends AbstractBOTest
         return expBO;
     }
 
-    private void prepareTryFindSample(final GroupPE group, final String sampleCode,
+    private void prepareTryFindSample(final SpacePE group, final String sampleCode,
             final SamplePE foundSample)
     {
         context.checking(new Expectations()
             {
                 {
-                    one(sampleDAO).tryFindByCodeAndGroup(sampleCode, group);
+                    one(sampleDAO).tryFindByCodeAndSpace(sampleCode, group);
                     will(returnValue(foundSample));
                 }
             });
@@ -694,12 +694,12 @@ public final class ExperimentBOTest extends AbstractBOTest
     {
         ProjectPE project = new ProjectPE();
         project.setCode(projectCode);
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setCode(groupCode);
         final DatabaseInstancePE db = new DatabaseInstancePE();
         db.setCode(dbCode);
         group.setDatabaseInstance(db);
-        project.setGroup(group);
+        project.setSpace(group);
         return project;
     }
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBOTest.java
index 2ce8b5b5a79..98c50164052 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataBOTest.java
@@ -51,7 +51,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.NewExternalData;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
@@ -516,12 +516,12 @@ public class ExternalDataBOTest extends AbstractBOTest
                             DATABASE_INSTANCE_IDENTIFIER.getDatabaseInstanceCode());
                     will(returnValue(ManagerTestTool.EXAMPLE_DATABASE_INSTANCE));
 
-                    one(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
+                    one(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
                             GROUP_IDENTIFIER.getSpaceCode(),
                             ManagerTestTool.EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(ManagerTestTool.EXAMPLE_GROUP));
 
-                    one(sampleDAO).tryFindByCodeAndGroup(SAMPLE_IDENTIFIER.getSampleCode(),
+                    one(sampleDAO).tryFindByCodeAndSpace(SAMPLE_IDENTIFIER.getSampleCode(),
                             ManagerTestTool.EXAMPLE_GROUP);
                     will(returnValue(sample));
                 }
@@ -686,12 +686,12 @@ public class ExternalDataBOTest extends AbstractBOTest
         experiment.setCode(experimentCode);
         ProjectPE project = new ProjectPE();
         project.setCode("P");
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setCode("G");
         DatabaseInstancePE databaseInstance = new DatabaseInstancePE();
         databaseInstance.setCode("DB");
         group.setDatabaseInstance(databaseInstance);
-        project.setGroup(group);
+        project.setSpace(group);
         experiment.setProject(project);
         return experiment;
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTableTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTableTest.java
index 82a928ca33d..d753de49e72 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTableTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ExternalDataTableTest.java
@@ -54,7 +54,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -502,13 +502,13 @@ public final class ExternalDataTableTest extends AbstractBOTest
         experiment.setExperimentType(new ExperimentTypePE());
         ProjectPE project = new ProjectPE();
         project.setCode("p1");
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setCode("g1");
         DatabaseInstancePE instance = new DatabaseInstancePE();
         instance.setCode("instance");
         instance.setOriginalSource(true);
         group.setDatabaseInstance(instance);
-        project.setGroup(group);
+        project.setSpace(group);
         experiment.setProject(project);
         data.setExperiment(experiment);
         DataSetTypePE type = new DataSetTypePE();
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBOTest.java
index 430cfb461ee..ee78d1f849e 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/GroupBOTest.java
@@ -21,7 +21,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.server.business.ManagerTestTool;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * Test cases for corresponding {@link GroupBO} class.
@@ -71,7 +71,7 @@ public final class GroupBOTest extends AbstractBOTest
         final GroupBO spaceBO = createGroupBO();
         final DatabaseInstancePE instance = new DatabaseInstancePE();
         instance.setOriginalSource(true);
-        final GroupPE groupDTO = new GroupPE();
+        final SpacePE groupDTO = new SpacePE();
         groupDTO.setCode("MY_CODE");
         groupDTO.setDatabaseInstance(instance);
         context.checking(new Expectations()
@@ -80,7 +80,7 @@ public final class GroupBOTest extends AbstractBOTest
                     one(daoFactory).getHomeDatabaseInstance();
                     will(returnValue(instance));
 
-                    one(groupDAO).createGroup(groupDTO);
+                    one(groupDAO).createSpace(groupDTO);
                 }
             });
         spaceBO.define(groupDTO.getCode(), null);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBOTest.java
index 3adff019ed3..c1bb0350e17 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/ProjectBOTest.java
@@ -131,6 +131,6 @@ public final class ProjectBOTest extends AbstractBOTest
     private ProjectIdentifier createProjectIdent()
     {
         final ProjectPE projectDTO = ManagerTestTool.EXAMPLE_PROJECT;
-        return new ProjectIdentifier(projectDTO.getGroup().getCode(), projectDTO.getCode());
+        return new ProjectIdentifier(projectDTO.getSpace().getCode(), projectDTO.getCode());
     }
 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTableTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTableTest.java
index 1a2d5e81c89..f6ec89b7e55 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTableTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/RoleAssignmentTableTest.java
@@ -25,7 +25,7 @@ import ch.systemsx.cisd.openbis.generic.server.business.ManagerTestTool;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Grantee;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.NewRoleAssignment;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
@@ -62,7 +62,7 @@ public final class RoleAssignmentTableTest extends AbstractBOTest
         databaseInstancePE.setCode(databaseInstanceCode);
         final long databaseInstanceId = 12L;
         databaseInstancePE.setId(databaseInstanceId);
-        final GroupPE groupPE = new GroupPE();
+        final SpacePE groupPE = new SpacePE();
         groupPE.setCode(groupCode);
         context.checking(new Expectations()
             {
@@ -74,7 +74,7 @@ public final class RoleAssignmentTableTest extends AbstractBOTest
                     one(databaseInstanceDAO).tryFindDatabaseInstanceByCode(databaseInstanceCode);
                     will(returnValue(databaseInstancePE));
 
-                    one(groupDAO).tryFindGroupByCodeAndDatabaseInstance(groupCode.toUpperCase(),
+                    one(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(groupCode.toUpperCase(),
                             databaseInstancePE);
                     will(returnValue(groupPE));
                 }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
index 18acefbd950..40aab5e8b54 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBOTest.java
@@ -51,7 +51,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RelationshipTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -202,7 +202,7 @@ public final class SampleBOTest extends AbstractBOTest
                                     return false;
                                 }
                                 final SamplePE sample = (SamplePE) item;
-                                assertEquals(EXAMPLE_SESSION.tryGetHomeGroup(), sample.getGroup());
+                                assertEquals(EXAMPLE_SESSION.tryGetHomeGroup(), sample.getSpace());
                                 assertNull(sample.getDatabaseInstance());
                                 assertEquals(newSample.getIdentifier(), sample
                                         .getSampleIdentifier().toString());
@@ -260,12 +260,12 @@ public final class SampleBOTest extends AbstractBOTest
 
         final SamplePE generatedFrom = new SamplePE();
         generatedFrom.setRegistrator(EXAMPLE_PERSON);
-        generatedFrom.setGroup(EXAMPLE_GROUP);
+        generatedFrom.setSpace(EXAMPLE_GROUP);
         generatedFrom.setCode("SAMPLE_GENERATOR");
 
         final SamplePE container = new SamplePE();
         container.setRegistrator(EXAMPLE_PERSON);
-        container.setGroup(EXAMPLE_GROUP);
+        container.setSpace(EXAMPLE_GROUP);
         container.setCode("SAMPLE_CONTAINER");
 
         final SampleTypePE sampleType = new SampleTypePE();
@@ -289,11 +289,11 @@ public final class SampleBOTest extends AbstractBOTest
                     ManagerTestTool.prepareFindGroup(this, daoFactory, groupDAO,
                             databaseInstanceDAO);
 
-                    one(sampleDAO).tryFindByCodeAndGroup(generatedFromIdentifier.getSampleCode(),
+                    one(sampleDAO).tryFindByCodeAndSpace(generatedFromIdentifier.getSampleCode(),
                             EXAMPLE_GROUP);
                     will(returnValue(generatedFrom));
 
-                    one(sampleDAO).tryFindByCodeAndGroup(containerIdentifier.getSampleCode(),
+                    one(sampleDAO).tryFindByCodeAndSpace(containerIdentifier.getSampleCode(),
                             EXAMPLE_GROUP);
                     will(returnValue(container));
 
@@ -381,8 +381,8 @@ public final class SampleBOTest extends AbstractBOTest
         final ExperimentIdentifier experimentIdentifier = new ExperimentIdentifier();
         experimentIdentifier.setExperimentCode("exp1");
         experimentIdentifier.setProjectCode(project.getCode());
-        experimentIdentifier.setSpaceCode(project.getGroup().getCode());
-        experimentIdentifier.setDatabaseInstanceCode(project.getGroup().getDatabaseInstance()
+        experimentIdentifier.setSpaceCode(project.getSpace().getCode());
+        experimentIdentifier.setDatabaseInstanceCode(project.getSpace().getDatabaseInstance()
                 .getCode());
 
         // create a sample already attached to an experiment
@@ -393,7 +393,7 @@ public final class SampleBOTest extends AbstractBOTest
         sample.setId(SAMPLE_TECH_ID.getId());
         sample.setCode("sampleCode");
         sample.setExperiment(sampleExperiment);
-        sample.setGroup(EXAMPLE_GROUP);
+        sample.setSpace(EXAMPLE_GROUP);
         sample.setSampleType(createSampleTypePE(SAMPLE_TYPE));
 
         Date now = new Date();
@@ -452,7 +452,7 @@ public final class SampleBOTest extends AbstractBOTest
                 }
             });
         String newSampleIdentifierWithoutDb = "/" + sample.getCode();
-        assertNotNull(sample.getGroup());
+        assertNotNull(sample.getSpace());
         createSampleBO().update(
                 new SampleUpdatesDTO(SAMPLE_TECH_ID, null, null, Collections
                         .<NewAttachment> emptyList(), now, SampleIdentifierFactory
@@ -460,7 +460,7 @@ public final class SampleBOTest extends AbstractBOTest
         String newSampleIdentWithDb =
                 EXAMPLE_DATABASE_INSTANCE.getCode() + ":" + newSampleIdentifierWithoutDb;
         assertEquals(newSampleIdentWithDb, sample.getSampleIdentifier().toString());
-        assertNull(sample.getGroup());
+        assertNull(sample.getSpace());
         context.assertIsSatisfied();
 
     }
@@ -492,11 +492,11 @@ public final class SampleBOTest extends AbstractBOTest
                             EXAMPLE_DATABASE_INSTANCE.getCode());
                     will(returnValue(EXAMPLE_DATABASE_INSTANCE));
 
-                    allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
-                            parent.getGroup().getCode(), EXAMPLE_DATABASE_INSTANCE);
+                    allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
+                            parent.getSpace().getCode(), EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(EXAMPLE_GROUP));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(parent.getCode(), EXAMPLE_GROUP);
+                    allowing(sampleDAO).tryFindByCodeAndSpace(parent.getCode(), EXAMPLE_GROUP);
                     will(returnValue(parent));
 
                     allowing(externalDataDAO).hasExternalData(with(sample));
@@ -546,23 +546,23 @@ public final class SampleBOTest extends AbstractBOTest
                     allowing(daoFactory).getHomeDatabaseInstance();
                     will(returnValue(EXAMPLE_DATABASE_INSTANCE));
 
-                    allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
+                    allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
                             EXAMPLE_GROUP.getCode(), EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(EXAMPLE_GROUP));
 
-                    allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
+                    allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
                             EXAMPLE_GROUP2.getCode(), EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(EXAMPLE_GROUP2));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(parent1Group1.getCode(),
+                    allowing(sampleDAO).tryFindByCodeAndSpace(parent1Group1.getCode(),
                             EXAMPLE_GROUP);
                     will(returnValue(parent1Group1));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(parent2Group1.getCode(),
+                    allowing(sampleDAO).tryFindByCodeAndSpace(parent2Group1.getCode(),
                             EXAMPLE_GROUP);
                     will(returnValue(parent2Group1));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(parent3Group2.getCode(),
+                    allowing(sampleDAO).tryFindByCodeAndSpace(parent3Group2.getCode(),
                             EXAMPLE_GROUP2);
                     will(returnValue(parent3Group2));
 
@@ -587,12 +587,12 @@ public final class SampleBOTest extends AbstractBOTest
         context.assertIsSatisfied();
     }
 
-    private SamplePE createSample(String code, GroupPE group)
+    private SamplePE createSample(String code, SpacePE group)
     {
         final SamplePE sample = new SamplePE();
         sample.setId(SAMPLE_TECH_ID.getId());
         sample.setCode(code);
-        sample.setGroup(group);
+        sample.setSpace(group);
         sample.setSampleType(createSampleTypePE(SAMPLE_TYPE));
         return sample;
     }
@@ -616,11 +616,11 @@ public final class SampleBOTest extends AbstractBOTest
                             EXAMPLE_DATABASE_INSTANCE.getCode());
                     will(returnValue(EXAMPLE_DATABASE_INSTANCE));
 
-                    allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
-                            container.getGroup().getCode(), EXAMPLE_DATABASE_INSTANCE);
+                    allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
+                            container.getSpace().getCode(), EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(EXAMPLE_GROUP));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(container.getCode(), EXAMPLE_GROUP);
+                    allowing(sampleDAO).tryFindByCodeAndSpace(container.getCode(), EXAMPLE_GROUP);
                     will(returnValue(container));
 
                     allowing(externalDataDAO).hasExternalData(with(sample));
@@ -656,11 +656,11 @@ public final class SampleBOTest extends AbstractBOTest
                             EXAMPLE_DATABASE_INSTANCE.getCode());
                     will(returnValue(EXAMPLE_DATABASE_INSTANCE));
 
-                    allowing(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
-                            container.getGroup().getCode(), EXAMPLE_DATABASE_INSTANCE);
+                    allowing(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
+                            container.getSpace().getCode(), EXAMPLE_DATABASE_INSTANCE);
                     will(returnValue(EXAMPLE_GROUP2));
 
-                    allowing(sampleDAO).tryFindByCodeAndGroup(container.getCode(), EXAMPLE_GROUP2);
+                    allowing(sampleDAO).tryFindByCodeAndSpace(container.getCode(), EXAMPLE_GROUP2);
                     will(returnValue(container));
 
                     allowing(externalDataDAO).hasExternalData(with(sample));
@@ -769,9 +769,9 @@ public final class SampleBOTest extends AbstractBOTest
 
                     final SamplePE groupParent = new SamplePE();
                     groupParent.setRegistrator(EXAMPLE_PERSON);
-                    groupParent.setGroup(EXAMPLE_GROUP);
+                    groupParent.setSpace(EXAMPLE_GROUP);
                     groupParent.setCode("SAMPLE_GENERATOR");
-                    one(sampleDAO).tryFindByCodeAndGroup(parentGroupIdentifier.getSampleCode(),
+                    one(sampleDAO).tryFindByCodeAndSpace(parentGroupIdentifier.getSampleCode(),
                             EXAMPLE_GROUP);
                     will(returnValue(groupParent));
 
@@ -852,7 +852,7 @@ public final class SampleBOTest extends AbstractBOTest
                     one(propertiesConverter).convertProperties(IEntityProperty.EMPTY_ARRAY, null,
                             EXAMPLE_PERSON);
 
-                    one(sampleDAO).tryFindByCodeAndGroup("DOES_NOT_EXIST",
+                    one(sampleDAO).tryFindByCodeAndSpace("DOES_NOT_EXIST",
                             EXAMPLE_SESSION.tryGetHomeGroup());
                     will(returnValue(null));
                 }
@@ -889,7 +889,7 @@ public final class SampleBOTest extends AbstractBOTest
                     one(propertiesConverter).convertProperties(IEntityProperty.EMPTY_ARRAY, null,
                             EXAMPLE_PERSON);
 
-                    one(sampleDAO).tryFindByCodeAndGroup("DOES_NOT_EXIST",
+                    one(sampleDAO).tryFindByCodeAndSpace("DOES_NOT_EXIST",
                             EXAMPLE_SESSION.tryGetHomeGroup());
                     will(returnValue(null));
                 }
@@ -944,7 +944,7 @@ public final class SampleBOTest extends AbstractBOTest
     {
         ProjectPE project = new ProjectPE();
         project.setCode("code");
-        project.setGroup(EXAMPLE_GROUP);
+        project.setSpace(EXAMPLE_GROUP);
         return project;
     }
 
@@ -1007,13 +1007,13 @@ public final class SampleBOTest extends AbstractBOTest
                     databaseInstance.setCode("MY_DATABASE_INSTANCE");
                     will(returnValue(databaseInstance));
 
-                    one(groupDAO).tryFindGroupByCodeAndDatabaseInstance(
+                    one(groupDAO).tryFindSpaceByCodeAndDatabaseInstance(
                             sampleIdentifier.getSpaceLevel().getSpaceCode(), databaseInstance);
-                    GroupPE group = new GroupPE();
+                    SpacePE group = new SpacePE();
                     will(returnValue(group));
 
                     String sampleCode = sampleIdentifier.getSampleCode();
-                    one(sampleDAO).tryFindByCodeAndGroup(sampleCode, group);
+                    one(sampleDAO).tryFindByCodeAndSpace(sampleCode, group);
                     will(returnValue(sample));
                 }
             });
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleGenericBusinessRulesTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleGenericBusinessRulesTest.java
index cd27108a0c6..c0df7e75f4f 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleGenericBusinessRulesTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleGenericBusinessRulesTest.java
@@ -22,7 +22,7 @@ import org.testng.annotations.Test;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.shared.basic.BasicConstant;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RelationshipTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleRelationshipPE;
@@ -53,19 +53,19 @@ public final class SampleGenericBusinessRulesTest extends AssertJUnit
         return d;
     }
 
-    private static GroupPE createGroup(DatabaseInstancePE db, String code)
+    private static SpacePE createGroup(DatabaseInstancePE db, String code)
     {
-        GroupPE g = new GroupPE();
+        SpacePE g = new SpacePE();
         g.setCode(code);
         g.setDatabaseInstance(db);
         return g;
     }
 
-    private static SamplePE createGroupSample(GroupPE g, String code)
+    private static SamplePE createGroupSample(SpacePE g, String code)
     {
         SamplePE s = new SamplePE();
         s.setCode(code);
-        s.setGroup(g);
+        s.setSpace(g);
         return s;
     }
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityListingQueryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityListingQueryTest.java
index 2d1faa75f6c..9bea14d4318 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityListingQueryTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/common/entity/SecondaryEntityListingQueryTest.java
@@ -82,7 +82,7 @@ public class SecondaryEntityListingQueryTest extends AbstractDAOTest
         assertEquals(firstExperiment.getCode(), expFull.getCode());
         ProjectPE project = firstExperiment.getProject();
         assertEquals(project.getCode(), expFull.getProject().getCode());
-        assertEquals(project.getGroup().getCode(), expFull.getProject().getSpace().getCode());
+        assertEquals(project.getSpace().getCode(), expFull.getProject().getSpace().getCode());
         assertEquals(firstExperiment.getEntityType().getCode(), expFull.getEntityType().getCode());
     }
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListingQueryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListingQueryTest.java
index d296588591a..9f179dca794 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListingQueryTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/datasetlister/DatasetListingQueryTest.java
@@ -46,7 +46,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.db.AbstractDAOTest;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.DatabaseInstance;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 
@@ -192,11 +192,11 @@ public class DatasetListingQueryTest extends AbstractDAOTest
     {
         DatabaseInstancePE dbInstancePE = new DatabaseInstancePE();
         dbInstancePE.setId(dbInstanceId);
-        GroupPE group =
-                daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(groupCode,
+        SpacePE group =
+                daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(groupCode,
                         dbInstancePE);
         assertNotNull(group);
-        SamplePE sample = daoFactory.getSampleDAO().tryFindByCodeAndGroup(sampleCode, group);
+        SamplePE sample = daoFactory.getSampleDAO().tryFindByCodeAndSpace(sampleCode, group);
         assertNotNull(sample);
         return sample;
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingQueryTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingQueryTest.java
index 143623ef5e2..b1370ec09f1 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingQueryTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/business/bo/samplelister/SampleListingQueryTest.java
@@ -47,7 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.PropertyType;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleTypePE;
 
@@ -84,7 +84,7 @@ public class SampleListingQueryTest extends AbstractDAOTest
 
     private DatabaseInstancePE dbInstance;
 
-    private GroupPE group;
+    private SpacePE group;
 
     private long groupId;
 
@@ -109,7 +109,7 @@ public class SampleListingQueryTest extends AbstractDAOTest
         dbInstanceId = sampleListerDAO.getDatabaseInstanceId();
         dbInstance = daoFactory.getDatabaseInstanceDAO().getByTechId(new TechId(dbInstanceId));
         group =
-                daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(DEFAULT_SPACE_CODE,
+                daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(DEFAULT_SPACE_CODE,
                         dbInstance);
         groupId = group.getId();
         groupCode = group.getCode();
@@ -173,9 +173,9 @@ public class SampleListingQueryTest extends AbstractDAOTest
     public void testGetParentRelations()
     {
         dilutionPlate1 =
-                daoFactory.getSampleDAO().tryFindByCodeAndGroup(DILUTION_PLATE_CODE_1, group);
+                daoFactory.getSampleDAO().tryFindByCodeAndSpace(DILUTION_PLATE_CODE_1, group);
         dilutionPlate2 =
-                daoFactory.getSampleDAO().tryFindByCodeAndGroup(DILUTION_PLATE_CODE_2, group);
+                daoFactory.getSampleDAO().tryFindByCodeAndSpace(DILUTION_PLATE_CODE_2, group);
         final int children1 = 3;
         final int children2 = 6;
         assertEquals(children1, dilutionPlate1.getGenerated().size());
@@ -262,7 +262,7 @@ public class SampleListingQueryTest extends AbstractDAOTest
         {
             final String msg = "id: " + sample.id;
             final SampleRecord sample2 = query.getSample(sample.id);
-            assertEquals(msg, groupId, sample.grou_id.longValue());
+            assertEquals(msg, groupId, sample.space_id.longValue());
             assertTrue(msg, EqualsBuilder.reflectionEquals(sample, sample2));
             ++sampleCount;
         }
@@ -320,7 +320,7 @@ public class SampleListingQueryTest extends AbstractDAOTest
             final String msg = "id: " + sample.id;
             final SampleRecord sample2 = query.getSample(sample.id);
             assertTrue(msg, EqualsBuilder.reflectionEquals(sample, sample2));
-            assertEquals(msg, groupId, sample.grou_id.longValue());
+            assertEquals(msg, groupId, sample.space_id.longValue());
             assertNotNull(msg, sample.expe_id);
             ++sampleCount;
         }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java
index e5c1623ebd7..4ee82110a6f 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/AbstractDAOWithoutContextTest.java
@@ -53,7 +53,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EntityTypePropertyTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
@@ -224,10 +224,10 @@ public abstract class AbstractDAOWithoutContextTest extends
         return databaseInstance;
     }
 
-    protected GroupPE createGroup(final String groupCode)
+    protected SpacePE createSpace(final String spaceCode)
     {
         final DatabaseInstancePE databaseInstance = daoFactory.getHomeDatabaseInstance();
-        return createGroup(groupCode, databaseInstance);
+        return createSpace(spaceCode, databaseInstance);
     }
 
     protected ScriptPE createScriptInDB(final String name, String script, String description,
@@ -251,14 +251,14 @@ public abstract class AbstractDAOWithoutContextTest extends
         return result;
     }
 
-    protected GroupPE createGroup(final String groupCode, final DatabaseInstancePE databaseInstance)
+    protected SpacePE createSpace(final String spaceCode, final DatabaseInstancePE databaseInstance)
     {
-        final GroupPE group = new GroupPE();
-        group.setCode(groupCode);
-        group.setDatabaseInstance(databaseInstance);
-        group.setRegistrator(getSystemPerson());
-        daoFactory.getGroupDAO().createGroup(group);
-        return group;
+        final SpacePE space = new SpacePE();
+        space.setCode(spaceCode);
+        space.setDatabaseInstance(databaseInstance);
+        space.setRegistrator(getSystemPerson());
+        daoFactory.getSpaceDAO().createSpace(space);
+        return space;
     }
 
     protected ExternalDataPE findExternalData(String code)
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAOTest.java
index 9fcc7e16a43..ff55521f785 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/GroupDAOTest.java
@@ -30,19 +30,19 @@ import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
 import ch.rinn.restrictions.Friend;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
- * Test cases for corresponding {@link GroupDAO} class.
+ * Test cases for corresponding {@link SpaceDAO} class.
  * 
  * @author Franz-Josef Elmer
  */
 @Test(groups =
     { "db", "group" })
-@Friend(toClasses = GroupPE.class)
+@Friend(toClasses = SpacePE.class)
 public final class GroupDAOTest extends AbstractDAOTest
 {
     private static final String NEW_TEST_GROUP = "test-group";
@@ -51,11 +51,11 @@ public final class GroupDAOTest extends AbstractDAOTest
     public void testCreateGroup()
     {
         final String groupCode = NEW_TEST_GROUP;
-        final GroupPE group = createGroup(groupCode);
+        final SpacePE group = createSpace(groupCode);
 
         final DatabaseInstancePE databaseInstance = daoFactory.getHomeDatabaseInstance();
-        final GroupPE retrievedGroup =
-                daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(groupCode,
+        final SpacePE retrievedGroup =
+                daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(groupCode,
                         databaseInstance);
         AssertJUnit.assertNotNull(retrievedGroup);
         assertEquals(group.getRegistrator(), retrievedGroup.getRegistrator());
@@ -64,7 +64,7 @@ public final class GroupDAOTest extends AbstractDAOTest
     @Test
     public void testListGroups()
     {
-        final List<GroupPE> groups = daoFactory.getGroupDAO().listGroups();
+        final List<SpacePE> groups = daoFactory.getSpaceDAO().listSpaces();
         Collections.sort(groups);
         assertEquals("CISD", groups.get(0).getCode());
         assertEquals("TESTGROUP", groups.get(1).getCode());
@@ -74,8 +74,8 @@ public final class GroupDAOTest extends AbstractDAOTest
     @Test
     public void testListGroupsOfHomeDatabaseInstance()
     {
-        final List<GroupPE> groups =
-                daoFactory.getGroupDAO().listGroups(daoFactory.getHomeDatabaseInstance());
+        final List<SpacePE> groups =
+                daoFactory.getSpaceDAO().listSpaces(daoFactory.getHomeDatabaseInstance());
         Collections.sort(groups);
         assertEquals("CISD", groups.get(0).getCode());
         assertEquals("TESTGROUP", groups.get(1).getCode());
@@ -87,8 +87,8 @@ public final class GroupDAOTest extends AbstractDAOTest
     {
         final DatabaseInstancePE databaseInstance = createDatabaseInstance("another-db");
         databaseInstance.setOriginalSource(true); // to cheat GroupDAO
-        createGroup("test-group", databaseInstance);
-        final List<GroupPE> groups = daoFactory.getGroupDAO().listGroups(databaseInstance);
+        createSpace("test-group", databaseInstance);
+        final List<SpacePE> groups = daoFactory.getSpaceDAO().listSpaces(databaseInstance);
         assertEquals("TEST-GROUP", groups.get(0).getCode());
         assertEquals(1, groups.size());
     }
@@ -98,10 +98,10 @@ public final class GroupDAOTest extends AbstractDAOTest
     {
         // create new group with no connections
         final String groupCode = NEW_TEST_GROUP;
-        createGroup(groupCode);
+        createSpace(groupCode);
 
-        final IGroupDAO groupDAO = daoFactory.getGroupDAO();
-        final GroupPE deletedGroup = findGroup(groupCode);
+        final ISpaceDAO groupDAO = daoFactory.getSpaceDAO();
+        final SpacePE deletedGroup = findGroup(groupCode);
 
         // Deleted group should have all collections which prevent it from deletion empty.
         assertTrue(deletedGroup.getProjects().isEmpty());
@@ -116,8 +116,8 @@ public final class GroupDAOTest extends AbstractDAOTest
     @Test(expectedExceptions = DataIntegrityViolationException.class)
     public final void testDeleteFail()
     {
-        final IGroupDAO groupDAO = daoFactory.getGroupDAO();
-        final GroupPE deletedGroup = findGroup("TESTGROUP");
+        final ISpaceDAO groupDAO = daoFactory.getSpaceDAO();
+        final SpacePE deletedGroup = findGroup("TESTGROUP");
 
         // Deleted project should have projects which prevent it from deletion.
         assertFalse(deletedGroup.getProjects().isEmpty());
@@ -126,12 +126,12 @@ public final class GroupDAOTest extends AbstractDAOTest
         groupDAO.delete(deletedGroup);
     }
 
-    private final GroupPE findGroup(String code)
+    private final SpacePE findGroup(String code)
     {
-        final IGroupDAO groupDAO = daoFactory.getGroupDAO();
+        final ISpaceDAO groupDAO = daoFactory.getSpaceDAO();
         final DatabaseInstancePE databaseInstance = daoFactory.getHomeDatabaseInstance();
-        final GroupPE group =
-                groupDAO.tryFindGroupByCodeAndDatabaseInstance(code, databaseInstance);
+        final SpacePE group =
+                groupDAO.tryFindSpaceByCodeAndDatabaseInstance(code, databaseInstance);
         assertNotNull(group);
 
         return group;
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAOTest.java
index a2a6839de86..8fa1b0c704d 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/MaterialDAOTest.java
@@ -145,7 +145,7 @@ public final class MaterialDAOTest extends AbstractDAOTest
 
         // Assert that BACTERIUM-X has been used as a property value
         SamplePE sample =
-                daoFactory.getSampleDAO().tryFindByCodeAndGroup("CP-TEST-1", createGroup("CISD"));
+                daoFactory.getSampleDAO().tryFindByCodeAndSpace("CP-TEST-1", createSpace("CISD"));
         assertNotNull(sample);
         boolean bacteriumFound = false;
         for (SamplePropertyPE property : sample.getProperties())
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAOTest.java
index 907c918615b..c443036203f 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ProjectDAOTest.java
@@ -31,7 +31,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.util.HibernateUtils;
@@ -81,7 +81,7 @@ public class ProjectDAOTest extends AbstractDAOTest
         final ProjectPE defaultProject = allProjects.get(0);
         assertEquals(DEFAULT, defaultProject.getCode());
         final List<ProjectPE> groupProjects =
-                daoFactory.getProjectDAO().listProjects(defaultProject.getGroup());
+                daoFactory.getProjectDAO().listProjects(defaultProject.getSpace());
         assertEquals(3, groupProjects.size());
         Collections.sort(groupProjects);
         assertEquals(DEFAULT, groupProjects.get(0).getCode());
@@ -97,7 +97,7 @@ public class ProjectDAOTest extends AbstractDAOTest
         final ProjectPE testProject = allProjects.get(3);
         assertEquals(testProject.getCode(), TESTPROJ);
         final List<ProjectPE> groupProjects =
-                daoFactory.getProjectDAO().listProjects(testProject.getGroup());
+                daoFactory.getProjectDAO().listProjects(testProject.getSpace());
         assertEquals(1, groupProjects.size());
         Collections.sort(groupProjects);
         assertEquals(groupProjects.get(0).getCode(), TESTPROJ);
@@ -113,11 +113,11 @@ public class ProjectDAOTest extends AbstractDAOTest
 
         ProjectPE found =
                 daoFactory.getProjectDAO().tryFindProject(
-                        templateProject.getGroup().getDatabaseInstance().getCode(),
-                        templateProject.getGroup().getCode(), templateProject.getCode());
+                        templateProject.getSpace().getDatabaseInstance().getCode(),
+                        templateProject.getSpace().getCode(), templateProject.getCode());
         assertEquals(TESTPROJ, found.getCode());
-        assertEquals(templateProject.getGroup().getCode(), found.getGroup().getCode());
-        assertEquals(templateProject.getGroup().getDatabaseInstance().getCode(), found.getGroup()
+        assertEquals(templateProject.getSpace().getCode(), found.getSpace().getCode());
+        assertEquals(templateProject.getSpace().getDatabaseInstance().getCode(), found.getSpace()
                 .getDatabaseInstance().getCode());
     }
 
@@ -130,15 +130,15 @@ public class ProjectDAOTest extends AbstractDAOTest
         assertEquals(templateProject.getCode(), TESTPROJ);
 
         AssertJUnit.assertNull(daoFactory.getProjectDAO().tryFindProject(
-                templateProject.getGroup().getDatabaseInstance().getCode(),
-                templateProject.getGroup().getCode(), NONEXISTENT));
+                templateProject.getSpace().getDatabaseInstance().getCode(),
+                templateProject.getSpace().getCode(), NONEXISTENT));
 
         AssertJUnit.assertNull(daoFactory.getProjectDAO().tryFindProject(
-                templateProject.getGroup().getDatabaseInstance().getCode(), NONEXISTENT,
+                templateProject.getSpace().getDatabaseInstance().getCode(), NONEXISTENT,
                 templateProject.getCode()));
 
         AssertJUnit.assertNull(daoFactory.getProjectDAO().tryFindProject(NONEXISTENT,
-                templateProject.getGroup().getCode(), templateProject.getCode()));
+                templateProject.getSpace().getCode(), templateProject.getCode()));
     }
 
     @Test
@@ -149,28 +149,28 @@ public class ProjectDAOTest extends AbstractDAOTest
         final ProjectPE templateProject = allProjects.get(3);
         assertEquals(templateProject.getCode(), TESTPROJ);
         AssertJUnit.assertNull(daoFactory.getProjectDAO().tryFindProject(
-                templateProject.getGroup().getDatabaseInstance().getCode(),
-                templateProject.getGroup().getCode(), NONEXISTENT));
+                templateProject.getSpace().getDatabaseInstance().getCode(),
+                templateProject.getSpace().getCode(), NONEXISTENT));
         final ProjectPE newProject =
-                prepareProject(templateProject.getGroup(), NONEXISTENT, DESCRIPTION_NEW_PROJECT,
+                prepareProject(templateProject.getSpace(), NONEXISTENT, DESCRIPTION_NEW_PROJECT,
                         getSystemPerson());
         daoFactory.getProjectDAO().createProject(newProject);
         final ProjectPE registeredProject =
                 daoFactory.getProjectDAO().tryFindProject(
-                        templateProject.getGroup().getDatabaseInstance().getCode(),
-                        templateProject.getGroup().getCode(), NONEXISTENT);
+                        templateProject.getSpace().getDatabaseInstance().getCode(),
+                        templateProject.getSpace().getCode(), NONEXISTENT);
         AssertJUnit.assertNotNull(registeredProject);
         assertEquals(registeredProject.getDescription(), DESCRIPTION_NEW_PROJECT);
-        assertEquals(registeredProject.getGroup(), templateProject.getGroup());
+        assertEquals(registeredProject.getSpace(), templateProject.getSpace());
         assertEquals(registeredProject.getProjectLeader(), getSystemPerson());
     }
 
-    private ProjectPE prepareProject(GroupPE group, String code, String description, PersonPE leader)
+    private ProjectPE prepareProject(SpacePE group, String code, String description, PersonPE leader)
     {
         final ProjectPE result = new ProjectPE();
         result.setCode(code);
         result.setDescription(description);
-        result.setGroup(group);
+        result.setSpace(group);
         result.setProjectLeader(leader);
         final PersonPE systemPerson = getSystemPerson();
         result.setRegistrator(systemPerson);
@@ -195,9 +195,9 @@ public class ProjectDAOTest extends AbstractDAOTest
 
         // deleted project had objects connected that should not have been deleted:
         // - a group
-        GroupPE group = deletedProject.getGroup();
+        SpacePE group = deletedProject.getSpace();
         assertNotNull(group);
-        assertNotNull(daoFactory.getGroupDAO().tryGetByTechId(
+        assertNotNull(daoFactory.getSpaceDAO().tryGetByTechId(
                 new TechId(HibernateUtils.getId(group))));
     }
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAOTest.java
index b0b9376ec6b..121591b9e9e 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/RoleAssignmentDAOTest.java
@@ -21,7 +21,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.dto.AuthorizationGroupPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 
@@ -48,10 +48,10 @@ public class RoleAssignmentDAOTest extends AbstractDAOTest
         AssertJUnit.assertEquals(0, daoFactory.getRoleAssignmentDAO().listRoleAssignmentsByPerson(
                 user).size());
 
-        GroupPE group = daoFactory.getGroupDAO().listGroups().get(0);
+        SpacePE group = daoFactory.getSpaceDAO().listSpaces().get(0);
         RoleAssignmentPE roleAssignment = new RoleAssignmentPE();
         roleAssignment.setRole(RoleCode.ADMIN);
-        roleAssignment.setGroup(group);
+        roleAssignment.setSpace(group);
         roleAssignment.setRegistrator(getSystemPerson());
 
         user.addRoleAssignment(roleAssignment);
@@ -68,10 +68,10 @@ public class RoleAssignmentDAOTest extends AbstractDAOTest
         AssertJUnit.assertEquals(0, daoFactory.getRoleAssignmentDAO()
                 .listRoleAssignmentsByAuthorizationGroup(authGroup).size());
 
-        GroupPE group = daoFactory.getGroupDAO().listGroups().get(0);
+        SpacePE group = daoFactory.getSpaceDAO().listSpaces().get(0);
         RoleAssignmentPE roleAssignment = new RoleAssignmentPE();
         roleAssignment.setRole(RoleCode.ADMIN);
-        roleAssignment.setGroup(group);
+        roleAssignment.setSpace(group);
         roleAssignment.setRegistrator(getSystemPerson());
 
         authGroup.addRoleAssignment(roleAssignment);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAOTest.java
index 0ad2895ca0c..bb791a6a9c8 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SampleDAOTest.java
@@ -47,7 +47,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventPE.EntityType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.EventType;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePropertyPE;
@@ -259,28 +259,27 @@ public final class SampleDAOTest extends AbstractDAOTest
     }
 
     @Test
-    public final void testTryFindByCodeAndGroup()
+    public final void testTryFindByCodeAndSpace()
     {
         final ISampleDAO sampleDAO = daoFactory.getSampleDAO();
-        final SamplePE sample = createGroupSample();
-        boolean fail = true;
+        final SamplePE sample = createSpaceSample();
         try
         {
-            sampleDAO.tryFindByCodeAndGroup(null, null);
+            sampleDAO.tryFindByCodeAndSpace(null, null);
+            fail("AssertionError expected");
         } catch (final AssertionError e)
         {
-            fail = false;
+            // ignored
         }
-        assertFalse(fail);
-        assertEquals(sample, sampleDAO.tryFindByCodeAndGroup(sample.getCode(), sample.getGroup()));
-        assertNull(sampleDAO.tryFindByCodeAndGroup("", sample.getGroup()));
+        assertEquals(sample, sampleDAO.tryFindByCodeAndSpace(sample.getCode(), sample.getSpace()));
+        assertNull(sampleDAO.tryFindByCodeAndSpace("", sample.getSpace()));
     }
 
-    private final SamplePE findSample(String code, String groupCode)
+    private final SamplePE findSample(String code, String spaceCode)
     {
         final ISampleDAO sampleDAO = daoFactory.getSampleDAO();
-        final GroupPE group = findGroup("CISD");
-        final SamplePE sample = sampleDAO.tryFindByCodeAndGroup(code, group);
+        final SpacePE space = findSpace(spaceCode);
+        final SamplePE sample = sampleDAO.tryFindByCodeAndSpace(code, space);
         assertNotNull(sample);
 
         return sample;
@@ -435,13 +434,13 @@ public final class SampleDAOTest extends AbstractDAOTest
         deleteSample(deletedSample);
     }
 
-    private GroupPE findGroup(String groupCode)
+    private SpacePE findSpace(String spaceCode)
     {
-        GroupPE group =
-                daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(groupCode,
+        SpacePE space =
+                daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(spaceCode,
                         daoFactory.getHomeDatabaseInstance());
-        assert group != null : "group not found: " + groupCode;
-        return group;
+        assert space != null : "space not found: " + spaceCode;
+        return space;
     }
 
     @Test
@@ -487,18 +486,18 @@ public final class SampleDAOTest extends AbstractDAOTest
     }
 
     /**
-     * Creates a group sample in the database.
+     * Creates a space sample in the database.
      */
-    private final SamplePE createGroupSample()
+    private final SamplePE createSpaceSample()
     {
         final SampleTypePE sampleType = getSampleType(MASTER_PLATE);
-        final GroupPE group = createGroup("xxx");
+        final SpacePE space = createSpace("xxx");
         final SamplePE sample =
-                createSample(sampleType, "code", null, null, SampleOwner.createGroup(group));
+                createSample(sampleType, "code", null, null, SampleOwner.createSpace(space));
         save(sample);
         assertNotNull(sample);
         assertNotNull(sample.getSampleType());
-        assertNotNull(sample.getGroup());
+        assertNotNull(sample.getSpace());
         return sample;
     }
 
@@ -535,7 +534,7 @@ public final class SampleDAOTest extends AbstractDAOTest
         sample.setPermId(daoFactory.getPermIdDAO().createPermId());
         sample.setSampleType(type);
         sample.setDatabaseInstance(sampleOwner.tryGetDatabaseInstance());
-        sample.setGroup(sampleOwner.tryGetGroup());
+        sample.setSpace(sampleOwner.tryGetSpace());
         if (generatorOrNull != null)
         {
             sample.addParentRelationship(new SampleRelationshipPE(generatorOrNull, sample,
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java
index 13a50c0b79c..8c35d44f025 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/ScriptDAOTest.java
@@ -27,7 +27,7 @@ import org.testng.annotations.Test;
 
 import ch.rinn.restrictions.Friend;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.EntityKind;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ScriptPE;
 
 /**
@@ -37,7 +37,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ScriptPE;
  */
 @Test(groups =
     { "db", "script" })
-@Friend(toClasses = GroupPE.class)
+@Friend(toClasses = SpacePE.class)
 public final class ScriptDAOTest extends AbstractDAOTest
 {
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlUnitMigrationTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlUnitMigrationTest.java
index dfe55683fe7..ec501078639 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlUnitMigrationTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/SqlUnitMigrationTest.java
@@ -265,6 +265,7 @@ public final class SqlUnitMigrationTest
         final DatabaseConfigurationContext configurationContext =
                 createDatabaseContext(databaseKind);
         AbstractApplicationContext applicationContext = null;
+        unitTestRootDirectory.mkdirs();
         File migratedSchemaFile = null;
         try
         {
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/scalability/DBCreator.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/scalability/DBCreator.java
index 01f72627f56..e999e5b49cd 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/scalability/DBCreator.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/server/dataaccess/db/scalability/DBCreator.java
@@ -41,7 +41,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -171,7 +171,7 @@ public final class DBCreator extends AbstractDAOTest
 
     private DataSetTypePE defaultDataSetType;
 
-    private GroupPE defaultGroup;
+    private SpacePE defaultGroup;
 
     private ProjectPE defaultProject;
 
@@ -221,10 +221,10 @@ public final class DBCreator extends AbstractDAOTest
         return entityType;
     }
 
-    private final GroupPE createDefaultGroup()
+    private final SpacePE createDefaultGroup()
     {
         final String code = CodeGenerator.generateDefaultCode(CreatedEntityKind.GROUP);
-        return createGroup(code);
+        return createSpace(code);
     }
 
     private final ProjectPE createDefaultProject()
@@ -232,7 +232,7 @@ public final class DBCreator extends AbstractDAOTest
         final String code = CodeGenerator.generateDefaultCode(CreatedEntityKind.PROJECT);
         final ProjectPE project = new ProjectPE();
         project.setCode(code);
-        project.setGroup(defaultGroup);
+        project.setSpace(defaultGroup);
         project.setProjectLeader(getSystemPerson());
         project.setRegistrator(getSystemPerson());
         daoFactory.getProjectDAO().createProject(project);
@@ -297,7 +297,7 @@ public final class DBCreator extends AbstractDAOTest
         sample.setSampleType(type);
         sample.setRegistrationDate(new Date());
         sample.setRegistrator(getSystemPerson());
-        sample.setGroup(defaultGroup); // not shared
+        sample.setSpace(defaultGroup); // not shared
         sample.setExperiment(experiment);
         sample.setPermId(daoFactory.getPermIdDAO().createPermId());
         return sample;
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerTestCase.java
index a1a646887a5..c2ab4bbfb4b 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerTestCase.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/AbstractServerTestCase.java
@@ -58,7 +58,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IEntityTypeDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IFileFormatTypeDAO;
-import ch.systemsx.cisd.openbis.generic.server.dataaccess.IGroupDAO;
+import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISpaceDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPersonDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IProjectDAO;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IPropertyTypeDAO;
@@ -73,7 +73,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewExperiment;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.Session;
@@ -111,7 +111,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
 
     protected DatabaseInstancePE homeDatabaseInstance;
 
-    protected IGroupDAO groupDAO;
+    protected ISpaceDAO groupDAO;
 
     protected IExternalDataDAO externalDataDAO;
 
@@ -188,7 +188,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
         daoFactory = context.mock(IDAOFactory.class);
         databaseInstanceDAO = context.mock(IDatabaseInstanceDAO.class);
         personDAO = context.mock(IPersonDAO.class);
-        groupDAO = context.mock(IGroupDAO.class);
+        groupDAO = context.mock(ISpaceDAO.class);
         sampleDAO = context.mock(ISampleDAO.class);
         roleAssignmentDAO = context.mock(IRoleAssignmentDAO.class);
         externalDataDAO = context.mock(IExternalDataDAO.class);
@@ -237,7 +237,7 @@ public abstract class AbstractServerTestCase extends AssertJUnit
                     will(returnValue(personDAO));
                     allowing(daoFactory).getProjectDAO();
                     will(returnValue(projectDAO));
-                    allowing(daoFactory).getGroupDAO();
+                    allowing(daoFactory).getSpaceDAO();
                     will(returnValue(groupDAO));
                     allowing(daoFactory).getSampleDAO();
                     will(returnValue(sampleDAO));
@@ -341,15 +341,15 @@ public abstract class AbstractServerTestCase extends AssertJUnit
     protected static ProjectPE createProject(final String groupCode)
     {
         final ProjectPE projectPE = new ProjectPE();
-        final GroupPE groupPE = createGroup(groupCode);
-        projectPE.setGroup(groupPE);
+        final SpacePE groupPE = createGroup(groupCode);
+        projectPE.setSpace(groupPE);
         projectPE.setCode("P");
         return projectPE;
     }
 
-    protected static GroupPE createGroup(final String groupCode)
+    protected static SpacePE createGroup(final String groupCode)
     {
-        final GroupPE groupPE = new GroupPE();
+        final SpacePE groupPE = new SpacePE();
         groupPE.setCode(groupCode);
         DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode("DB");
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/CommonTestUtils.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/CommonTestUtils.java
index 28a6503704b..7bbf27cbffa 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/CommonTestUtils.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/CommonTestUtils.java
@@ -33,7 +33,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPropertyPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePropertyTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.MaterialTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
@@ -178,16 +178,16 @@ public class CommonTestUtils
         return person;
     }
 
-    static public GroupPE createGroup(final String groupCode,
+    static public SpacePE createGroup(final String groupCode,
             final DatabaseInstancePE databaseInstance)
     {
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setCode(groupCode);
         group.setDatabaseInstance(databaseInstance);
         return group;
     }
 
-    public static GroupPE createGroup(SpaceIdentifier identifier)
+    public static SpacePE createGroup(SpaceIdentifier identifier)
     {
         DatabaseInstancePE db = createDatabaseInstance(identifier.getDatabaseInstanceCode());
         return createGroup(identifier.getSpaceCode(), db);
@@ -252,7 +252,7 @@ public class CommonTestUtils
     {
         final ProjectPE project = new ProjectPE();
         project.setCode(pi.getProjectCode());
-        project.setGroup(createGroup(pi.getSpaceCode(), createDatabaseInstance(pi
+        project.setSpace(createGroup(pi.getSpaceCode(), createDatabaseInstance(pi
                 .getDatabaseInstanceCode())));
         return project;
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/AuthorizationTestCase.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/AuthorizationTestCase.java
index 28dc9b4915d..a1ec1648660 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/AuthorizationTestCase.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/AuthorizationTestCase.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.GridCustomFilterPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -76,7 +76,7 @@ public class AuthorizationTestCase extends AssertJUnit
      */
     protected RoleWithIdentifier createGroupRole(RoleCode roleCode, GroupIdentifier spaceIdentifier)
     {
-        GroupPE groupPE = new GroupPE();
+        SpacePE groupPE = new SpacePE();
         groupPE.setCode(spaceIdentifier.getSpaceCode());
         DatabaseInstancePE instance = createDatabaseInstancePE(spaceIdentifier);
         groupPE.setDatabaseInstance(instance);
@@ -155,9 +155,9 @@ public class AuthorizationTestCase extends AssertJUnit
      * Creates a list of spaces which contains {@link #createGroup()} and
      * {@link #createAnotherGroup()}.
      */
-    protected List<GroupPE> createGroups()
+    protected List<SpacePE> createGroups()
     {
-        final List<GroupPE> groups = new ArrayList<GroupPE>();
+        final List<SpacePE> groups = new ArrayList<SpacePE>();
         groups.add(createGroup());
         groups.add(createAnotherGroup());
         return groups;
@@ -167,7 +167,7 @@ public class AuthorizationTestCase extends AssertJUnit
      * Creates a group with code {@link #SPACE_CODE} and database instance with code
      * {@link AuthorizationTestCase#INSTANCE_CODE}.
      */
-    protected GroupPE createGroup()
+    protected SpacePE createGroup()
     {
         return createGroup(SPACE_CODE, createDatabaseInstance());
     }
@@ -176,7 +176,7 @@ public class AuthorizationTestCase extends AssertJUnit
      * Creates a group with code {@link #ANOTHER_GROUP_CODE} and database instance with code
      * {@link #ANOTHER_INSTANCE_CODE}.
      */
-    protected GroupPE createAnotherGroup()
+    protected SpacePE createAnotherGroup()
     {
         return createGroup(ANOTHER_GROUP_CODE, createAnotherDatabaseInstance());
     }
@@ -184,7 +184,7 @@ public class AuthorizationTestCase extends AssertJUnit
     /**
      * Creates a group based on the specified identifier.
      */
-    protected GroupPE createGroup(GroupIdentifier identifier)
+    protected SpacePE createGroup(GroupIdentifier identifier)
     {
         final String databaseInstanceCode = identifier.getDatabaseInstanceCode();
         final DatabaseInstancePE instance = createDatabaseInstance(databaseInstanceCode);
@@ -194,10 +194,10 @@ public class AuthorizationTestCase extends AssertJUnit
     /**
      * Creates a group with specified group code and database instance.
      */
-    protected GroupPE createGroup(final String groupCode,
+    protected SpacePE createGroup(final String groupCode,
             final DatabaseInstancePE databaseInstancePE)
     {
-        final GroupPE group = new GroupPE();
+        final SpacePE group = new SpacePE();
         group.setCode(groupCode);
         group.setDatabaseInstance(databaseInstancePE);
         return group;
@@ -231,7 +231,7 @@ public class AuthorizationTestCase extends AssertJUnit
         // Group assignment
         assignment = new RoleAssignmentPE();
         assignment.setRole(RoleCode.USER);
-        assignment.setGroup(createAnotherGroup());
+        assignment.setSpace(createAnotherGroup());
         person.addRoleAssignment(assignment);
         list.add(assignment);
 
@@ -241,17 +241,17 @@ public class AuthorizationTestCase extends AssertJUnit
     /**
      * Creates a project in the specified group.
      */
-    protected ProjectPE createProject(GroupPE group)
+    protected ProjectPE createProject(SpacePE group)
     {
         final ProjectPE projectPE = new ProjectPE();
-        projectPE.setGroup(group);
+        projectPE.setSpace(group);
         return projectPE;
     }
 
     /**
      * Creates an experiment in the specified group.
      */
-    protected ExperimentPE createExperiment(GroupPE group)
+    protected ExperimentPE createExperiment(SpacePE group)
     {
         final ExperimentPE experiment = new ExperimentPE();
         final ExperimentTypePE experimentType = new ExperimentTypePE();
@@ -264,10 +264,10 @@ public class AuthorizationTestCase extends AssertJUnit
     /**
      * Creates a sample in the specified group.
      */
-    protected SamplePE createSample(GroupPE group)
+    protected SamplePE createSample(SpacePE group)
     {
         final SamplePE sample = new SamplePE();
-        sample.setGroup(group);
+        sample.setSpace(group);
         sample.setSampleType(createSampleType());
         return sample;
     }
@@ -337,7 +337,7 @@ public class AuthorizationTestCase extends AssertJUnit
      * Prepares {@link #provider} to expect a query for the home database instance and groups.
      */
     protected final void prepareProvider(final DatabaseInstancePE databaseInstance,
-            final List<GroupPE> groups)
+            final List<SpacePE> groups)
     {
         context.checking(new Expectations()
             {
@@ -373,7 +373,7 @@ public class AuthorizationTestCase extends AssertJUnit
      * list of groups.
      */
     protected final void prepareProvider(final String databaseInstanceCode,
-            final DatabaseInstancePE databaseInstance, final List<GroupPE> groups)
+            final DatabaseInstancePE databaseInstance, final List<SpacePE> groups)
     {
         prepareProvider(databaseInstanceCode, databaseInstance);
         context.checking(new Expectations()
@@ -390,7 +390,7 @@ public class AuthorizationTestCase extends AssertJUnit
      * list of groups and a query for the specified entity kind and technical id which will return
      * the specifier group.
      */
-    protected final void prepareProvider(final List<GroupPE> groups, final GroupPE groupPE,
+    protected final void prepareProvider(final List<SpacePE> groups, final SpacePE groupPE,
             final SpaceOwnerKind entityKind, final TechId techId)
     {
         context.checking(new Expectations()
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifierTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifierTest.java
index bc6f262874f..ee1ada722d3 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifierTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/RoleWithIdentifierTest.java
@@ -29,7 +29,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleLevel;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
 
@@ -70,7 +70,7 @@ public final class RoleWithIdentifierTest extends AuthorizationTestCase
     @Test
     public final void testFactory()
     {
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         DatabaseInstancePE instance = new DatabaseInstancePE();
         new RoleWithIdentifier(RoleLevel.SPACE, RoleCode.USER, null, group);
         new RoleWithIdentifier(RoleLevel.INSTANCE, RoleCode.OBSERVER, instance, null);
@@ -132,9 +132,9 @@ public final class RoleWithIdentifierTest extends AuthorizationTestCase
     public final void testCreateRoleFromRoleAssignment()
     {
         final RoleAssignmentPE roleAssignment = new RoleAssignmentPE();
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setDatabaseInstance(new DatabaseInstancePE());
-        roleAssignment.setGroup(group);
+        roleAssignment.setSpace(group);
         roleAssignment.setRole(RoleCode.OBSERVER);
         RoleWithIdentifier role = RoleWithIdentifier.createRole(roleAssignment);
         assertEquals(role.getRoleLevel(), RoleLevel.SPACE);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java
index d43aae00222..7482748fcb3 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/AbstractTechIdPredicateTest.java
@@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCa
 import ch.systemsx.cisd.openbis.generic.shared.authorization.SpaceOwnerKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 
 /**
@@ -68,7 +68,7 @@ public final class AbstractTechIdPredicateTest extends AuthorizationTestCase
     public final void testExceptionBecauseGroupDoesNotExist()
     {
         final AbstractTechIdPredicate predicate = createPredicate();
-        prepareProvider(Collections.<GroupPE> emptyList(), createGroup(), ENTITY_KIND, TECH_ID);
+        prepareProvider(Collections.<SpacePE> emptyList(), createGroup(), ENTITY_KIND, TECH_ID);
         predicate.init(provider);
         assertTrue(predicate.doEvaluation(createPerson(), createRoles(false), TECH_ID).isError());
         context.assertIsSatisfied();
@@ -91,9 +91,9 @@ public final class AbstractTechIdPredicateTest extends AuthorizationTestCase
     {
         final AbstractTechIdPredicate predicate = createPredicate();
         final PersonPE person = createPerson();
-        person.setHomeGroup(createGroup());
+        person.setHomeSpace(createGroup());
         final DatabaseInstancePE homeDatabaseInstance = createDatabaseInstance();
-        final GroupPE homeGroup = createGroup(null, homeDatabaseInstance);
+        final SpacePE homeGroup = createGroup(null, homeDatabaseInstance);
         prepareProvider(createGroups(), homeGroup, ENTITY_KIND, TECH_ID);
         predicate.init(provider);
         final Status evaluation = predicate.doEvaluation(person, createRoles(false), TECH_ID);
@@ -120,8 +120,8 @@ public final class AbstractTechIdPredicateTest extends AuthorizationTestCase
     {
         final AbstractTechIdPredicate predicate = createPredicate();
         final DatabaseInstancePE homeDatabaseInstance = createDatabaseInstance();
-        final List<GroupPE> groups = createGroups();
-        final GroupPE anotherGroup = createGroup(ANOTHER_GROUP_CODE, homeDatabaseInstance);
+        final List<SpacePE> groups = createGroups();
+        final SpacePE anotherGroup = createGroup(ANOTHER_GROUP_CODE, homeDatabaseInstance);
         groups.add(anotherGroup);
         prepareProvider(groups, anotherGroup, ENTITY_KIND, TECH_ID);
         predicate.init(provider);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSampleCriteriaPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSampleCriteriaPredicateTest.java
index c22712ff0fd..8f9bd5f2e0b 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSampleCriteriaPredicateTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/ListSampleCriteriaPredicateTest.java
@@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.SpaceOwnerKind;
 import ch.systemsx.cisd.openbis.generic.shared.basic.TechId;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListSampleCriteria;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 
 /**
  * @author Bernd Rinn
@@ -56,7 +56,7 @@ public class ListSampleCriteriaPredicateTest extends AuthorizationTestCase
     public final void testExceptionBecauseGroupDoesNotExist()
     {
         final ListSampleCriteriaPredicate predicate = new ListSampleCriteriaPredicate();
-        prepareProvider(createDatabaseInstance(), Collections.<GroupPE> emptyList());
+        prepareProvider(createDatabaseInstance(), Collections.<SpacePE> emptyList());
         predicate.init(provider);
         final ListSampleCriteria criteria = new ListSampleCriteria();
         criteria.setSpaceCode(SPACE_CODE);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplePredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplePredicateTest.java
index aa2f9b4b407..0864bc65cd9 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplePredicateTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/NewSamplePredicateTest.java
@@ -25,7 +25,7 @@ import ch.systemsx.cisd.common.exceptions.Status;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.NewSample;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.SampleType;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.DatabaseInstanceIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.SampleIdentifier;
@@ -104,7 +104,7 @@ public class NewSamplePredicateTest extends AuthorizationTestCase
         NewSample sample =
                 NewSample.createWithParent(sampleIdentifier.toString(), sampleType, "container",
                         "parent");
-        List<GroupPE> groups = Arrays.asList(createGroup(groupIdentifier));
+        List<SpacePE> groups = Arrays.asList(createGroup(groupIdentifier));
         prepareProvider(INSTANCE_CODE, createDatabaseInstance(), groups);
         predicate.init(provider);
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java
index 58fe9d50f94..2d65379dbf4 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/predicate/SpaceIdentifierPredicateTest.java
@@ -26,7 +26,7 @@ import ch.systemsx.cisd.common.exceptions.StatusFlag;
 import ch.systemsx.cisd.common.exceptions.UserFailureException;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.GroupIdentifier;
 
@@ -58,7 +58,7 @@ public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase
     public final void testExceptionBecauseInstanceDoesNotExist()
     {
         final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate();
-        prepareProvider(INSTANCE_CODE, null, Collections.<GroupPE> emptyList());
+        prepareProvider(INSTANCE_CODE, null, Collections.<SpacePE> emptyList());
         predicate.init(provider);
         predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier(
                 INSTANCE_CODE, SPACE_CODE)).isError();
@@ -69,7 +69,7 @@ public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase
     public final void testExceptionBecauseGroupDoesNotExist()
     {
         final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate();
-        prepareProvider(INSTANCE_CODE, createDatabaseInstance(), Collections.<GroupPE> emptyList());
+        prepareProvider(INSTANCE_CODE, createDatabaseInstance(), Collections.<SpacePE> emptyList());
         predicate.init(provider);
         assertTrue(predicate.doEvaluation(createPerson(), createRoles(false), new GroupIdentifier(
                 INSTANCE_CODE, SPACE_CODE)).isError());
@@ -96,8 +96,8 @@ public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase
         prepareProvider(INSTANCE_CODE, createDatabaseInstance(), createGroups());
         predicate.init(provider);
         final PersonPE person = createPerson();
-        final GroupPE homeGroup = createGroup();
-        person.setHomeGroup(homeGroup);
+        final SpacePE homeGroup = createGroup();
+        person.setHomeSpace(homeGroup);
         final GroupIdentifier groupIdentifier = new GroupIdentifier(INSTANCE_CODE, null);
         final Status evaluation =
                 predicate.doEvaluation(person, createRoles(false), groupIdentifier);
@@ -125,7 +125,7 @@ public final class SpaceIdentifierPredicateTest extends AuthorizationTestCase
     {
         final DatabaseInstancePE homeDatabaseInstance = createDatabaseInstance();
         final SpaceIdentifierPredicate predicate = new SpaceIdentifierPredicate();
-        final List<GroupPE> groups = createGroups();
+        final List<SpacePE> groups = createGroups();
         groups.add(createGroup(ANOTHER_GROUP_CODE, homeDatabaseInstance));
         prepareProvider(INSTANCE_CODE, createDatabaseInstance(), groups);
         predicate.init(provider);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExperimentValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExperimentValidatorTest.java
index 9423cfbf77a..9d0e53a3a72 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExperimentValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExperimentValidatorTest.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.authorization.validator;
 import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.ExperimentTranslator;
 
@@ -55,7 +55,7 @@ public class ExperimentValidatorTest extends AuthorizationTestCase
     {
         ExperimentValidator validator = new ExperimentValidator();
         PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         assertEquals(false, validator.isValid(person, ExperimentTranslator.translate(
                 createExperiment(group), BASE_URL)));
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExternalDataValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExternalDataValidatorTest.java
index e2b55eefbd6..b9a0e8b39ea 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExternalDataValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ExternalDataValidatorTest.java
@@ -20,7 +20,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.ExperimentTranslator;
 
@@ -31,7 +31,7 @@ import ch.systemsx.cisd.openbis.generic.shared.translator.ExperimentTranslator;
  */
 public class ExternalDataValidatorTest extends AuthorizationTestCase
 {
-    private ExternalData createData(GroupPE group)
+    private ExternalData createData(SpacePE group)
     {
         ExternalData data = new ExternalData();
         data.setExperiment(ExperimentTranslator.translate(createExperiment(group), "http://someURL"));
@@ -59,7 +59,7 @@ public class ExternalDataValidatorTest extends AuthorizationTestCase
     {
         ExternalDataValidator validator = new ExternalDataValidator();
         PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         assertEquals(false, validator.isValid(person, createData(group)));
     }
     
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/GroupValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/GroupValidatorTest.java
index d2bc37330d1..c4cf4e9b884 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/GroupValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/GroupValidatorTest.java
@@ -21,7 +21,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.GroupTranslator;
 
@@ -52,7 +52,7 @@ public final class GroupValidatorTest extends AuthorizationTestCase
     {
         final SpaceValidator groupValidator = new SpaceValidator();
         final PersonPE personPE = createPerson();
-        final GroupPE groupPE = createGroup();
+        final SpacePE groupPE = createGroup();
         final Space space = GroupTranslator.translate(groupPE);
         
         assertFalse(groupValidator.isValid(personPE, space));
@@ -65,7 +65,7 @@ public final class GroupValidatorTest extends AuthorizationTestCase
     {
         final SpaceValidator groupValidator = new SpaceValidator();
         final PersonPE personPE = createPersonWithRoleAssignments();
-        final GroupPE groupPE = createAnotherGroup();
+        final SpacePE groupPE = createAnotherGroup();
         final Space space = GroupTranslator.translate(groupPE);
         assertTrue(groupValidator.isValid(personPE, space));
         context.assertIsSatisfied();
@@ -76,7 +76,7 @@ public final class GroupValidatorTest extends AuthorizationTestCase
     {
         final SpaceValidator groupValidator = new SpaceValidator();
         final PersonPE personPE = createPersonWithRoleAssignments();
-        final GroupPE groupPE = createGroup();
+        final SpacePE groupPE = createGroup();
         final Space space = GroupTranslator.translate(groupPE);
         assertTrue(groupValidator.isValid(personPE, space));
         context.assertIsSatisfied();
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/MatchingEntityValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/MatchingEntityValidatorTest.java
index 5d3c9ed23b6..89fa6699737 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/MatchingEntityValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/MatchingEntityValidatorTest.java
@@ -23,7 +23,7 @@ import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCa
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.MatchingEntity;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.IMatchingEntity;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
@@ -49,17 +49,17 @@ public final class MatchingEntityValidatorTest extends AuthorizationTestCase
         return result;
     }
 
-    private static GroupPE tryGetGroup(IMatchingEntity matchingEntity)
+    private static SpacePE tryGetGroup(IMatchingEntity matchingEntity)
     {
         final EntityKind entityKind = matchingEntity.getEntityKind();
         switch (entityKind)
         {
             case EXPERIMENT:
                 final ExperimentPE experiment = (ExperimentPE) matchingEntity;
-                return experiment.getProject().getGroup();
+                return experiment.getProject().getSpace();
             case SAMPLE:
                 final SamplePE sample = (SamplePE) matchingEntity;
-                return sample.getGroup();
+                return sample.getSpace();
             default:
                 return null;
         }
@@ -101,7 +101,7 @@ public final class MatchingEntityValidatorTest extends AuthorizationTestCase
     public final void testWithExperimentInTheWrongGroup()
     {
         final PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         final ExperimentPE experiment = createExperiment(group);
         final MatchingEntityValidator validator = new MatchingEntityValidator();
         assertEquals(false, validator.isValid(person, asMatchingEntityStub(experiment)));
@@ -120,7 +120,7 @@ public final class MatchingEntityValidatorTest extends AuthorizationTestCase
     public final void testWithSampleInTheWrongGroup()
     {
         final PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         final SamplePE sample = createSample(group);
         final MatchingEntityValidator validator = new MatchingEntityValidator();
         assertEquals(false, validator.isValid(person, asMatchingEntityStub(sample)));
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ProjectValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ProjectValidatorTest.java
index 055d4549e72..e6e956e614f 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ProjectValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/ProjectValidatorTest.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.authorization.validator;
 import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.ProjectTranslator;
 
@@ -51,7 +51,7 @@ public class ProjectValidatorTest extends AuthorizationTestCase
     {
         ProjectValidator validator = new ProjectValidator();
         PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         assertEquals(false, validator.isValid(person, ProjectTranslator
                 .translate(createProject(group))));
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SampleValidatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SampleValidatorTest.java
index 45d1c2a8bd7..ff2de679d08 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SampleValidatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/authorization/validator/SampleValidatorTest.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.generic.shared.authorization.validator;
 import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.AuthorizationTestCase;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.translator.SampleTranslator;
 
@@ -73,7 +73,7 @@ public class SampleValidatorTest extends AuthorizationTestCase
     {
         SampleValidator validator = new SampleValidator();
         PersonPE person = createPersonWithRoleAssignments();
-        GroupPE group = createGroup("blabla", createAnotherDatabaseInstance());
+        SpacePE group = createGroup("blabla", createAnotherDatabaseInstance());
         assertEquals(false, validator.isValid(person, SampleTranslator.translate(
                 createSample(group), BASE_URL)));
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslatorTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslatorTest.java
index 33e113972b6..989b7a726ff 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslatorTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/shared/translator/ExternalDataTranslatorTest.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.FileFormatTypePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.InvalidationPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.LocatorTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
@@ -93,12 +93,12 @@ public class ExternalDataTranslatorTest extends AssertJUnit
         experimentPE.setExperimentType(new ExperimentTypePE());
         ProjectPE projectPE = new ProjectPE();
         projectPE.setCode("my-project");
-        GroupPE groupPE = new GroupPE();
+        SpacePE groupPE = new SpacePE();
         groupPE.setCode("my-group");
         DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode("my-instance");
         groupPE.setDatabaseInstance(databaseInstancePE);
-        projectPE.setGroup(groupPE);
+        projectPE.setSpace(groupPE);
         experimentPE.setProject(projectPE);
         externalDataPE.setExperiment(experimentPE);
         externalDataPE.setProductionDate(new Date(1));
@@ -159,12 +159,12 @@ public class ExternalDataTranslatorTest extends AssertJUnit
         experimentPE.setExperimentType(new ExperimentTypePE());
         ProjectPE projectPE = new ProjectPE();
         projectPE.setCode("my-project");
-        GroupPE groupPE = new GroupPE();
+        SpacePE groupPE = new SpacePE();
         groupPE.setCode("my-group");
         DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode("my-instance");
         groupPE.setDatabaseInstance(databaseInstancePE);
-        projectPE.setGroup(groupPE);
+        projectPE.setSpace(groupPE);
         experimentPE.setProject(projectPE);
         externalDataPE.setExperiment(experimentPE);
 
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessControllerTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessControllerTest.java
index 8b4e831a956..8aaf14b0fd2 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessControllerTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/QueryAccessControllerTest.java
@@ -27,7 +27,7 @@ import org.testng.annotations.Test;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.RoleWithHierarchy.RoleCode;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 
@@ -45,20 +45,20 @@ public class QueryAccessControllerTest
     {
         final RoleAssignmentPE groupRole = new RoleAssignmentPE();
 
-        final GroupPE groupPE = new GroupPE();
+        final SpacePE groupPE = new SpacePE();
         groupPE.setCode(groupCode);
         final DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode(DB_INSTANCE);
         groupPE.setDatabaseInstance(databaseInstancePE);
-        groupRole.setGroup(groupPE);
+        groupRole.setSpace(groupPE);
         groupRole.setRole(role);
 
         return groupRole;
     }
 
-    private final static GroupPE createGroup(String groupCode)
+    private final static SpacePE createGroup(String groupCode)
     {
-        final GroupPE groupPE = new GroupPE();
+        final SpacePE groupPE = new SpacePE();
         groupPE.setCode(groupCode);
         final DatabaseInstancePE databaseInstancePE = new DatabaseInstancePE();
         databaseInstancePE.setCode(DB_INSTANCE);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoaderTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoaderTest.java
index 86b6165a71e..286e81d776c 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoaderTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/DataSetGroupLoaderTest.java
@@ -30,7 +30,7 @@ import org.testng.annotations.Test;
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExternalDataDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 
 /**
@@ -78,7 +78,7 @@ public class DataSetGroupLoaderTest extends AssertJUnit
         keys.add(KNOWN_WITHOUT_GROUP);
         keys.add(UNKNOWN);
         final ArrayList<ExternalDataPE> datasets = new ArrayList<ExternalDataPE>();
-        GroupPE knownGroup = new GroupPE();
+        SpacePE knownGroup = new SpacePE();
         datasets.add(createDataset(KNOWN_WITH_GROUP, knownGroup));
         datasets.add(createDataset(KNOWN_WITHOUT_GROUP, null));
         context.checking(new Expectations()
@@ -88,19 +88,19 @@ public class DataSetGroupLoaderTest extends AssertJUnit
                     will(returnValue(datasets));
                 }
             });
-        Map<String, GroupPE> map = createLoader().loadGroups(keys);
+        Map<String, SpacePE> map = createLoader().loadGroups(keys);
         assertNull(map.get(UNKNOWN));
         assertNull(map.get(KNOWN_WITHOUT_GROUP));
         assertEquals(knownGroup, map.get(KNOWN_WITH_GROUP));
         context.assertIsSatisfied();
     }
 
-    private ExternalDataPE createDataset(String code, GroupPE group)
+    private ExternalDataPE createDataset(String code, SpacePE group)
     {
         ExternalDataPE dataset = new ExternalDataPE();
         ExperimentPE experiment = new ExperimentPE();
         ProjectPE project = new ProjectPE();
-        project.setGroup(group);
+        project.setSpace(group);
         experiment.setProject(project);
         dataset.setExperiment(experiment);
         dataset.setCode(code);
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoaderTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoaderTest.java
index ea58ab993c3..b436423371b 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoaderTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/ExperimentGroupLoaderTest.java
@@ -29,7 +29,7 @@ import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.IExperimentDAO;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 
 /**
@@ -77,7 +77,7 @@ public class ExperimentGroupLoaderTest extends AssertJUnit
         keys.add(KNOWN_WITHOUT_GROUP);
         keys.add(UNKNOWN);
         final ArrayList<ExperimentPE> experiments = new ArrayList<ExperimentPE>();
-        GroupPE knownGroup = new GroupPE();
+        SpacePE knownGroup = new SpacePE();
         experiments.add(createExperiment(KNOWN_WITH_GROUP, knownGroup));
         experiments.add(createExperiment(KNOWN_WITHOUT_GROUP, null));
         context.checking(new Expectations()
@@ -87,18 +87,18 @@ public class ExperimentGroupLoaderTest extends AssertJUnit
                     will(returnValue(experiments));
                 }
             });
-        Map<String, GroupPE> map = createLoader().loadGroups(keys);
+        Map<String, SpacePE> map = createLoader().loadGroups(keys);
         assertNull(map.get(UNKNOWN));
         assertNull(map.get(KNOWN_WITHOUT_GROUP));
         assertEquals(knownGroup, map.get(KNOWN_WITH_GROUP));
         context.assertIsSatisfied();
     }
 
-    private ExperimentPE createExperiment(String permId, GroupPE group)
+    private ExperimentPE createExperiment(String permId, SpacePE group)
     {
         ExperimentPE experiment = new ExperimentPE();
         ProjectPE project = new ProjectPE();
-        project.setGroup(group);
+        project.setSpace(group);
         experiment.setProject(project);
         experiment.setPermId(permId);
         return experiment;
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilterTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilterTest.java
index a17c58464ab..fb26186a7fa 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilterTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/QueryResultFilterTest.java
@@ -35,7 +35,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.StringTableCell;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModel;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelColumnHeader;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.TableModelRow;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.plugin.query.shared.authorization.IAuthorizationChecker;
 
@@ -102,7 +102,7 @@ public class QueryResultFilterTest extends AssertJUnit
                     will(returnValue(loader));
 
                     exactly(3).of(loader).loadGroups(new HashSet<String>());
-                    will(returnValue(new HashMap<String, GroupPE>()));
+                    will(returnValue(new HashMap<String, SpacePE>()));
                 }
             });
 
@@ -136,7 +136,7 @@ public class QueryResultFilterTest extends AssertJUnit
                     will(returnValue(loader));
 
                     exactly(3).of(loader).loadGroups(new HashSet<String>());
-                    will(returnValue(new HashMap<String, GroupPE>()));
+                    will(returnValue(new HashMap<String, SpacePE>()));
                 }
             });
 
@@ -179,13 +179,13 @@ public class QueryResultFilterTest extends AssertJUnit
                     keys.add(KEY2);
 
                     one(loader).loadGroups(keys);
-                    HashMap<String, GroupPE> map = new HashMap<String, GroupPE>();
-                    GroupPE group = new GroupPE();
+                    HashMap<String, SpacePE> map = new HashMap<String, SpacePE>();
+                    SpacePE group = new SpacePE();
                     map.put(KEY1, group);
                     will(returnValue(map));
 
                     exactly(2).of(loader).loadGroups(new HashSet<String>());
-                    will(returnValue(new HashMap<String, GroupPE>()));
+                    will(returnValue(new HashMap<String, SpacePE>()));
 
                     one(authorizationChecker).isAuthorized(person, group, RoleWithHierarchy.SPACE_OBSERVER);
                     will(returnValue(true));
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoaderTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoaderTest.java
index 390085bfbf4..430590ee416 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoaderTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/plugin/query/shared/authorization/result_filter/SampleGroupLoaderTest.java
@@ -28,7 +28,7 @@ import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
 import ch.systemsx.cisd.openbis.generic.server.dataaccess.ISampleDAO;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 
 /**
@@ -76,7 +76,7 @@ public class SampleGroupLoaderTest extends AssertJUnit
         keys.add(KNOWN_WITHOUT_GROUP);
         keys.add(UNKNOWN);
         final ArrayList<SamplePE> samples = new ArrayList<SamplePE>();
-        GroupPE knownGroup = new GroupPE();
+        SpacePE knownGroup = new SpacePE();
         samples.add(createSample(KNOWN_WITH_GROUP, knownGroup));
         samples.add(createSample(KNOWN_WITHOUT_GROUP, null));
         context.checking(new Expectations()
@@ -86,17 +86,17 @@ public class SampleGroupLoaderTest extends AssertJUnit
                     will(returnValue(samples));
                 }
             });
-        Map<String, GroupPE> map = createLoader().loadGroups(keys);
+        Map<String, SpacePE> map = createLoader().loadGroups(keys);
         assertNull(map.get(UNKNOWN));
         assertNull(map.get(KNOWN_WITHOUT_GROUP));
         assertEquals(knownGroup, map.get(KNOWN_WITH_GROUP));
         context.assertIsSatisfied();
     }
 
-    private SamplePE createSample(String permId, GroupPE group)
+    private SamplePE createSample(String permId, SpacePE group)
     {
         SamplePE sample = new SamplePE();
-        sample.setGroup(group);
+        sample.setSpace(group);
         sample.setPermId(permId);
         return sample;
     }
diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/AuthenticationSystemTest.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/AuthenticationSystemTest.java
index 9167446e811..9c8f5c9c2cd 100644
--- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/AuthenticationSystemTest.java
+++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/systemtest/AuthenticationSystemTest.java
@@ -55,7 +55,7 @@ public class AuthenticationSystemTest extends SystemTestCase
         String sessionToken = systemUser.getSessionToken();
         PersonPE person = commonServer.getAuthSession(sessionToken).tryGetPerson();
         RoleAssignmentPE role = person.getAllPersonRoles().iterator().next();
-        assertEquals(null, role.getGroup());
+        assertEquals(null, role.getSpace());
         assertEquals(RoleCode.ADMIN, role.getRole());
     }
 }
diff --git a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleLoader.java b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleLoader.java
index 8e9b5c25422..cdf101e2e53 100644
--- a/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleLoader.java
+++ b/rtd_phosphonetx/source/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/business/SampleLoader.java
@@ -28,7 +28,7 @@ import ch.systemsx.cisd.openbis.generic.server.dataaccess.IDAOFactory;
 import ch.systemsx.cisd.openbis.generic.shared.basic.BasicConstant;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ListOrSearchSampleCriteria;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleRelationShipSkeleton;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleSkeleton;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SampleTypePE;
@@ -78,8 +78,8 @@ public class SampleLoader implements ISampleLoader
         SampleTypePE sampleTypePE =
                 daoFactory.getSampleTypeDAO().tryFindSampleTypeByCode(sampleTypeCode);
         final Long sampleTypeID = sampleTypePE.getId();
-        GroupPE space =
-                daoFactory.getGroupDAO().tryFindGroupByCodeAndDatabaseInstance(spaceCode,
+        SpacePE space =
+                daoFactory.getSpaceDAO().tryFindSpaceByCodeAndDatabaseInstance(spaceCode,
                         daoFactory.getHomeDatabaseInstance());
         final Long spaceID = space.getId();
         List<SampleSkeleton> sampleSkeletons =
diff --git a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/ProteomicsDataServiceInternalTest.java b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/ProteomicsDataServiceInternalTest.java
index eaaf148e7e8..746a449c2cc 100644
--- a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/ProteomicsDataServiceInternalTest.java
+++ b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/server/ProteomicsDataServiceInternalTest.java
@@ -55,7 +55,7 @@ import ch.systemsx.cisd.openbis.generic.shared.dto.EntityPropertyPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentTypePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExternalDataPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ProjectPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
@@ -100,13 +100,13 @@ public class ProteomicsDataServiceInternalTest extends AbstractServerTestCase
         experimentType.setDatabaseInstance(CommonTestUtils.createHomeDatabaseInstance());
         PersonPE person = new PersonPE();
         RoleAssignmentPE roleAssignment = new RoleAssignmentPE();
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setCode("Space-0");
         DatabaseInstancePE databaseInstance = new DatabaseInstancePE();
         databaseInstance.setCode("db");
         databaseInstance.setUuid("UUID-db");
         group.setDatabaseInstance(databaseInstance);
-        roleAssignment.setGroup(group);
+        roleAssignment.setSpace(group);
         person.setRoleAssignments(Collections.singleton(roleAssignment));
         SESSION.setPerson(person);
     }
@@ -248,10 +248,10 @@ public class ProteomicsDataServiceInternalTest extends AbstractServerTestCase
                 new Session(CommonTestUtils.USER_ID, SESSION_TOKEN, PRINCIPAL, "remote-host", 1);
         PersonPE person = new PersonPE();
         RoleAssignmentPE roleAssignmentPE = new RoleAssignmentPE();
-        GroupPE group = new GroupPE();
+        SpacePE group = new SpacePE();
         group.setCode(spaceCode);
         group.setDatabaseInstance(CommonTestUtils.createHomeDatabaseInstance());
-        roleAssignmentPE.setGroup(group);
+        roleAssignmentPE.setSpace(group);
         person.setRoleAssignments(new HashSet<RoleAssignmentPE>(Arrays.asList(roleAssignmentPE)));
         session.setPerson(person);
         context.checking(new Expectations()
@@ -400,8 +400,8 @@ public class ProteomicsDataServiceInternalTest extends AbstractServerTestCase
         experiment.setCode("e" + id);
         ProjectPE project = new ProjectPE();
         project.setCode("p");
-        GroupPE group = CommonTestUtils.createGroup(GROUP_CODE, CommonTestUtils.createHomeDatabaseInstance());
-        project.setGroup(group);
+        SpacePE group = CommonTestUtils.createGroup(GROUP_CODE, CommonTestUtils.createHomeDatabaseInstance());
+        project.setSpace(group);
         experiment.setProject(project);
         experiment.setRegistrationDate(new Date(id * id));
         if (properties.length > 0)
diff --git a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/authorization/validator/RawDataSampleValidatorTest.java b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/authorization/validator/RawDataSampleValidatorTest.java
index 708d3acbe70..e8bb73be2f4 100644
--- a/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/authorization/validator/RawDataSampleValidatorTest.java
+++ b/rtd_phosphonetx/sourceTest/java/ch/systemsx/cisd/openbis/plugin/phosphonetx/shared/authorization/validator/RawDataSampleValidatorTest.java
@@ -27,7 +27,7 @@ import ch.systemsx.cisd.openbis.generic.shared.basic.dto.ExternalData;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Sample;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.Space;
 import ch.systemsx.cisd.openbis.generic.shared.dto.DatabaseInstancePE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.identifier.DatabaseInstanceIdentifier;
@@ -174,12 +174,12 @@ public class RawDataSampleValidatorTest extends AssertJUnit
             role.setDatabaseInstance(databaseInstance);
         } else
         {
-            GroupPE group = new GroupPE();
+            SpacePE group = new SpacePE();
             group.setCode(groupCodeOrNull);
             DatabaseInstancePE databaseInstance = new DatabaseInstancePE();
             databaseInstance.setUuid(dataBaseInstanceUUID);
             group.setDatabaseInstance(databaseInstance);
-            role.setGroup(group);
+            role.setSpace(group);
         }
         return role;
     }
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java
index b77622205f5..4b8ef7ad2a7 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/dataaccess/IScreeningQuery.java
@@ -46,7 +46,7 @@ public interface IScreeningQuery extends BaseQuery
                     + "      exp.perm_id as exp_perm_id,"
                     + "      exp_type.code as exp_type_code,"
                     + "      projects.code as proj_code,"
-                    + "      groups.code as space_code,"
+                    + "      spaces.code as space_code,"
                     + "      pl.perm_id as plate_perm_id,"
                     + "      pl.code as plate_code,"
                     + "      pl_type.code as plate_type_code,"
@@ -62,7 +62,7 @@ public interface IScreeningQuery extends BaseQuery
                     + "   join experiments exp on pl.expe_id = exp.id"
                     + "   join experiment_types exp_type on exp.exty_id = exp_type.id"
                     + "   join projects on exp.proj_id = projects.id"
-                    + "   join groups on projects.grou_id = groups.id"
+                    + "   join spaces on projects.space_id = spaces.id"
                     + "   join sample_types pl_type on pl.saty_id = pl_type.id"
                     + "   join sample_types well_type on well.saty_id = well_type.id"
                     + "   join sample_properties well_props on well.id = well_props.samp_id"
@@ -153,7 +153,7 @@ public interface IScreeningQuery extends BaseQuery
             + "      well_material.code as material_content_code"
             + " from samples well"
             + "   join samples pl on pl.id = well.samp_id_part_of"
-            + "   join groups sp on pl.grou_id = sp.id"
+            + "   join spaces sp on pl.space_id = sp.id"
             + "   join sample_properties well_props on well.id = well_props.samp_id"
             + "   join materials well_material on well_props.mate_prop_id = well_material.id"
             + "   join material_types well_material_type on well_material.maty_id = well_material_type.id"
@@ -173,7 +173,7 @@ public interface IScreeningQuery extends BaseQuery
             + "      well_material.code as material_content_code"
             + " from samples well"
             + "   join samples pl on pl.id = well.samp_id_part_of"
-            + "   join groups sp on pl.grou_id = sp.id"
+            + "   join spaces sp on pl.space_id = sp.id"
             + "   join sample_properties well_props on well.id = well_props.samp_id"
             + "   join materials well_material on well_props.mate_prop_id = well_material.id"
             + "   join material_types well_material_type on well_material.maty_id = well_material_type.id"
@@ -190,7 +190,7 @@ public interface IScreeningQuery extends BaseQuery
             + "         join controlled_vocabulary_terms cvte on cvte.id = sp.cvte_id "
             + "         join sample_type_property_types stpt on stpt.id = sp.stpt_id "
             + "         join property_types pt on pt.id = stpt.prty_id "
-            + "         join groups space on pl.grou_id = space.id"
+            + "         join spaces space on pl.space_id = space.id"
             + "      where pt.code = 'PLATE_GEOMETRY' "
             + "         and pt.is_internal_namespace = true and pl.perm_id = ?{1}")
     public PlateGeometryContainer tryGetPlateGeometry(String platePermId);
@@ -205,7 +205,7 @@ public interface IScreeningQuery extends BaseQuery
             + "         join controlled_vocabulary_terms cvte on cvte.id = sp.cvte_id "
             + "         join sample_type_property_types stpt on stpt.id = sp.stpt_id "
             + "         join property_types pt on pt.id = stpt.prty_id "
-            + "         join groups space on pl.grou_id = space.id"
+            + "         join spaces space on pl.space_id = space.id"
             + "      where pt.code = 'PLATE_GEOMETRY' "
             + "         and pt.is_internal_namespace = true and space.code = ?{1} and pl.code = ?{2}")
     public PlateGeometryContainer tryGetPlateGeometry(String spaceCode, String plateCode);
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java
index 58c64c9ab39..21c5d46f88f 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/server/logic/ScreeningApiImpl.java
@@ -202,7 +202,7 @@ public class ScreeningApiImpl
     {
         final ExperimentIdentifier experimentId =
                 new ExperimentIdentifier(experiment.getCode(), experiment.getProject().getCode(),
-                        experiment.getProject().getGroup().getCode(), experiment.getPermId());
+                        experiment.getProject().getSpace().getCode(), experiment.getPermId());
         return experimentId;
     }
 
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ExperimentIdentifierPredicate.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ExperimentIdentifierPredicate.java
index 4edc27383bd..87a7029d5d1 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ExperimentIdentifierPredicate.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ExperimentIdentifierPredicate.java
@@ -22,7 +22,7 @@ import ch.systemsx.cisd.common.exceptions.Status;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractGroupPredicate;
 import ch.systemsx.cisd.openbis.generic.shared.dto.ExperimentPE;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.util.SpaceCodeHelper;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ExperimentIdentifier;
@@ -54,7 +54,7 @@ public class ExperimentIdentifierPredicate extends AbstractGroupPredicate<Experi
                 return Status.createError(String.format(
                         "User '%s' does not have enough privileges.", person.getUserId()));
             }
-            final GroupPE space = experimentOrNull.getProject().getGroup();
+            final SpacePE space = experimentOrNull.getProject().getSpace();
             return evaluate(person, allowedRoles, space.getDatabaseInstance(), space.getCode());
         }
 
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/PlateWellReferenceWithDatasetsValidator.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/PlateWellReferenceWithDatasetsValidator.java
index f7c33b7b3cb..b60c5980375 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/PlateWellReferenceWithDatasetsValidator.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/PlateWellReferenceWithDatasetsValidator.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.screening.shared.api.authorization;
 import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.validator.AbstractValidator;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.PlateWellReferenceWithDatasets;
@@ -47,7 +47,7 @@ public class PlateWellReferenceWithDatasetsValidator extends
                 // Note: Here we assume that we operate on _the only_ db instance (the home db)!
                 return true;
             }
-            final GroupPE group = roleAssignment.getGroup();
+            final SpacePE group = roleAssignment.getSpace();
             if (group != null && group.getCode().equals(spaceCode))
             {
                 return true;
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningExperimentValidator.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningExperimentValidator.java
index fe58be10919..f7e2a6a6bdd 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningExperimentValidator.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningExperimentValidator.java
@@ -3,7 +3,7 @@ package ch.systemsx.cisd.openbis.plugin.screening.shared.api.authorization;
 import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.validator.AbstractValidator;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.ExperimentIdentifier;
@@ -29,7 +29,7 @@ public final class ScreeningExperimentValidator extends AbstractValidator<Experi
                 // Note: Here we assume that we operate on _the only_ db instance (the home db)!
                 return true;
             }
-            final GroupPE group = roleAssignment.getGroup();
+            final SpacePE group = roleAssignment.getSpace();
             if (group != null && group.getCode().equals(spaceCode))
             {
                 return true;
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateListReadOnlyPredicate.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateListReadOnlyPredicate.java
index 46d65e35577..6803373da24 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateListReadOnlyPredicate.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateListReadOnlyPredicate.java
@@ -22,7 +22,7 @@ import ch.systemsx.cisd.common.exceptions.Status;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.RoleWithIdentifier;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.annotation.ShouldFlattenCollections;
 import ch.systemsx.cisd.openbis.generic.shared.authorization.predicate.AbstractGroupPredicate;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.SamplePE;
 import ch.systemsx.cisd.openbis.generic.shared.util.SpaceCodeHelper;
@@ -61,7 +61,7 @@ public class ScreeningPlateListReadOnlyPredicate extends
                     return Status.createError(String.format(
                             "User '%s' does not have enough privileges.", person.getUserId()));
                 }
-                final GroupPE space = sampleOrNull.getGroup();
+                final SpacePE space = sampleOrNull.getSpace();
                 final Status status =
                         evaluate(person, allowedRoles, space.getDatabaseInstance(), space.getCode());
                 if (Status.OK.equals(status) == false)
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateValidator.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateValidator.java
index 48390653e8b..f02d401405c 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateValidator.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/api/authorization/ScreeningPlateValidator.java
@@ -3,7 +3,7 @@ package ch.systemsx.cisd.openbis.plugin.screening.shared.api.authorization;
 import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.validator.AbstractValidator;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.Plate;
@@ -31,7 +31,7 @@ public final class ScreeningPlateValidator extends AbstractValidator<Plate>
                     // home db always)
                     return true;
                 }
-                final GroupPE group = roleAssignment.getGroup();
+                final SpacePE group = roleAssignment.getSpace();
                 if (group != null && group.getCode().equals(spaceCode))
                 {
                     return true;
diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/authorization/WellContentValidator.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/authorization/WellContentValidator.java
index 0f6ec71d833..c6e1458a33a 100644
--- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/authorization/WellContentValidator.java
+++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/shared/authorization/WellContentValidator.java
@@ -19,7 +19,7 @@ package ch.systemsx.cisd.openbis.plugin.screening.shared.authorization;
 import java.util.Set;
 
 import ch.systemsx.cisd.openbis.generic.shared.authorization.validator.AbstractValidator;
-import ch.systemsx.cisd.openbis.generic.shared.dto.GroupPE;
+import ch.systemsx.cisd.openbis.generic.shared.dto.SpacePE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.PersonPE;
 import ch.systemsx.cisd.openbis.generic.shared.dto.RoleAssignmentPE;
 import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.WellContent;
@@ -45,7 +45,7 @@ public class WellContentValidator extends AbstractValidator<WellContent>
                 // Note: Here we assume that we operate on _the only_ db instance (the home db)!
                 return true;
             }
-            final GroupPE group = roleAssignment.getGroup();
+            final SpacePE group = roleAssignment.getSpace();
             if (group != null && group.getCode().equals(spaceCode))
             {
                 return true;
-- 
GitLab