public function updateObjectStateGroup(Group $objectStateGroup)
    {
        // First update the group
        $query = $this->dbHandler->createUpdateQuery();
        $query->update(
            $this->dbHandler->quoteTable('ezcobj_state_group')
        )->set(
            $this->dbHandler->quoteColumn('default_language_id'),
            $query->bindValue(
                $this->maskGenerator->generateLanguageIndicator($objectStateGroup->defaultLanguage, false),
                null,
                \PDO::PARAM_INT
            )
        )->set(
            $this->dbHandler->quoteColumn('identifier'),
            $query->bindValue($objectStateGroup->identifier)
        )->set(
            $this->dbHandler->quoteColumn('language_mask'),
            $query->bindValue(
                $this->maskGenerator->generateLanguageMaskFromLanguageCodes($objectStateGroup->languageCodes, true),
                null,
                ParameterType::INTEGER
            )
        )->where(
            $query->expr->eq(
                $this->dbHandler->quoteColumn('id'),
                $query->bindValue($objectStateGroup->id, null, \PDO::PARAM_INT)
            )
        );

        $query->prepare()->execute();

        // And then refresh group translations
        // by removing old ones and adding new ones
        $this->deleteObjectStateGroupTranslations($objectStateGroup->id);
        $this->insertObjectStateGroupTranslations($objectStateGroup);
    }