Move entity from source to destination collection.
486212
def move_to_collection(self, source_collection, destination_collection):
        """"""
        # Remove from collection.
        self.collections.remove(source_collection)  # pylint: disable=no-member
        source_collection.data.remove(*self.data.all())  # pylint: disable=no-member

        # Add to collection.
        self.collections.add(destination_collection)  # pylint: disable=no-member
        destination_collection.data.add(*self.data.all())
77511
protected function moveEntity($id, Request $request)
    {
        $destinationId = $this->getRequestParameter($request, 'destination');
        $locale = $this->getRequestParameter($request, 'locale', true);
        $collection = $this->getCollectionManager()->move($id, $locale, $destinationId);
        $view = $this->view($collection);

        return $this->handleView($view);
    }
668149
def move(self, place, distance = 1):
        """"""
        for d in range(distance):
            self.stream.write(self._get_cap('move '+place))
        self.flush()
17848
protected void moveExtraProperties( String oldNodeId,
                                        String newNodeId ) {
        ExtraPropertiesStore extraPropertiesStore = extraPropertiesStore();
        if (extraPropertiesStore == null || !extraPropertiesStore.contains(oldNodeId)) {
            return;
        }
        Map<Name, Property> existingExtraProps = extraPropertiesStore.getProperties(oldNodeId);
        extraPropertiesStore.removeProperties(oldNodeId);
        extraPropertiesStore.storeProperties(newNodeId, existingExtraProps);
    }
368101
def move_to(self, target, position='first-child'):
        """"""

        # Invalidate both in case position matters,
        # otherwise only target is needed.
        self.invalidate()
        target.invalidate()
        super(Page, self).move_to(target, position=position)
153904
protected function moveFile()
    {
        // if there is an error when moving the file, an exception will
        // be automatically thrown by move(). This will properly prevent
        // the entity from being persisted to the database on error
        $this->getFile()->move($this->getUploadRootDir(), $this->path);

        $this->setFile(null);
    }
810890
public static void moveFields(PdfDictionary from, PdfDictionary to) {
        for (Iterator i = from.getKeys().iterator(); i.hasNext();) {
            PdfName key = (PdfName)i.next();
            if (fieldKeys.containsKey(key)) {
                if (to != null)
                    to.put(key, from.get(key));
                i.remove();
            }
        }
    }
330012
def move(self, source_path, destination_path):
        
        self.copy(source_path, destination_path)
        self.remove(source_path)
389121
def move(self, source, destination):
        
        if source.isfile():
            source.copy(destination)
            source.remove()
        else:
            source.copy(destination, recursive=True)
            source.remove('r')
113746
private static final <E> void moveAll(ArrayList<E> source, ArrayList<E> target) {
		target.ensureCapacity(target.size() + source.size());
		for (int i = source.size() - 1; i >= 0; i--) {
			target.add(source.remove(i));
		}
	}
211602
def move(self, newX1) :
		""""""
		if self.x1 != None and self.x2 != None :
			offset = newX1-self.x1
			aux_moveTree(offset, self)
		elif len(self.children) > 0 :
			offset = newX1-self.children[0].x1
			aux_moveTree(offset, self)
1208085
def move_to_position(
        self,
        resource_id,
        to_position,
        new_parent_id=noop,
        db_session=None,
        *args,
        **kwargs
    ):
        
        return self.service.move_to_position(
            resource_id=resource_id,
            to_position=to_position,
            new_parent_id=new_parent_id,
            db_session=db_session,
            *args,
            **kwargs
        )
862868
def save(self, entity):
        """"""
        assert isinstance(entity, Entity), " entity must have an instance of Entity"
        return self.__collection.save(entity.as_dict())
394118
def resource_moved(self, resource, new_resource):
        """"""
        if self.moved is not None:
            self.moved(resource, new_resource)
275080
public void moveToRecordId(RecordId rid) {
		moveTo(rid.block().number());
		rp.moveToId(rid.id());
	}
761652
def _bind_sources_to_destination(self):
        # type: (SyncCopy) ->
        #        Tuple[blobxfer.models.azure.StorageEntity,
        #        blobxfer.models.azure.StorageEntity]
        
        seen = set()
        # iterate through source paths to download
        for src in self._spec.sources:
            for src_ase in src.files(
                    self._creds, self._spec.options,
                    self._general_options.dry_run):
                # generate copy destinations for source
                dest = [
                    dst_ase for dst_ase in
                    self._generate_destination_for_source(src_ase)
                ]
                if len(dest) == 0:
                    continue
                primary_dst = dest[0]
                uid = blobxfer.operations.synccopy.SyncCopy.create_deletion_id(
                    primary_dst._client, primary_dst.container,
                    primary_dst.name)
                if uid in seen:
                    raise RuntimeError(
                        'duplicate destination entity detected: {}/{}'.format(
                            primary_dst._client.primary_endpoint,
                            primary_dst.path))
                seen.add(uid)
                # add to exclusion set
                if self._spec.options.delete_extraneous_destination:
                    self._delete_exclude.add(uid)
                if len(dest[1:]) > 0:
                    if primary_dst.replica_targets is None:
                        primary_dst.replica_targets = []
                    primary_dst.replica_targets.extend(dest[1:])
                    # check replica targets for duplicates
                    for rt in primary_dst.replica_targets:
                        ruid = (
                            blobxfer.operations.synccopy.SyncCopy.
                            create_deletion_id(
                                rt._client, rt.container, rt.name)
                        )
                        if ruid in seen:
                            raise RuntimeError(
                                ('duplicate destination entity detected: '
                                 '{}/{}').format(
                                     rt._client.primary_endpoint, rt.path))
                        seen.add(ruid)
                        # add replica targets to deletion exclusion set
                        if self._spec.options.delete_extraneous_destination:
                            self._delete_exclude.add(ruid)
                yield src_ase, primary_dst
1285346
function move(src, dest) {
	return rename(src, dest).catch((err) => {
		// try copying
		return copy(src, dest).then(() => {
			// delete source
			return unlink(src);
		});
	});
}