예제 #1
0
파일: uow.py 프로젝트: helixyte/everest
    def register_clean(self, entity_class, entity):
        """
        Registers the given entity for the given class as CLEAN.

        :returns: Cloned entity.
        """
        EntityState.manage(entity, self)
        EntityState.get_state(entity).status = ENTITY_STATUS.CLEAN
        self.__entity_set_map[entity_class].add(entity)
예제 #2
0
    def register_clean(self, entity_class, entity):
        """
        Registers the given entity for the given class as CLEAN.

        :returns: Cloned entity.
        """
        EntityState.manage(entity, self)
        EntityState.get_state(entity).status = ENTITY_STATUS.CLEAN
        self.__entity_set_map[entity_class].add(entity)
예제 #3
0
파일: uow.py 프로젝트: helixyte/everest
    def register_deleted(self, entity_class, entity):
        """
        Registers the given entity for the given class as DELETED.

        :raises ValueError: If the given entity already holds state that was
          created by another Unit Of Work.
        """
        EntityState.manage(entity, self)
        EntityState.get_state(entity).status = ENTITY_STATUS.DELETED
        self.__entity_set_map[entity_class].add(entity)
예제 #4
0
    def register_deleted(self, entity_class, entity):
        """
        Registers the given entity for the given class as DELETED.

        :raises ValueError: If the given entity already holds state that was
          created by another Unit Of Work.
        """
        EntityState.manage(entity, self)
        EntityState.get_state(entity).status = ENTITY_STATUS.DELETED
        self.__entity_set_map[entity_class].add(entity)