Attaches the rabalist to a raba object. Only attached rabalists can  be saved
485840
def _attachToObject(self, anchorObj, relationName) :
		""
		if self.anchorObj == None :
			self.relationName = relationName
			self.anchorObj = anchorObj
			self._setNamespaceConAndConf(anchorObj._rabaClass._raba_namespace)
			self.tableName = self.connection.makeRabaListTableName(self.anchorObj._rabaClass.__name__, self.relationName)
			faultyElmt = self._checkSelf()
			if faultyElmt != None :
				raise ValueError("Element %s violates specified list or relation constraints" % faultyElmt)
		elif self.anchorObj is not anchorObj :
			raise ValueError("Ouch: attempt to steal rabalist, use RabaLict.copy() instead.\nthief: %s\nvictim: %s\nlist: %s" % (anchorObj, self.anchorObj, self))
486712
def _attach_to_instance(self, instance):
        
        self._instance = instance
        self.lockable = self.lockable and instance.lockable
539123
def attach_remote(self, id, name, **kwargs):
        

        client_id = id.split(".")[0]

        widget = self.make_widget(
            id,
            name,
            dispatcher=ProxyDispatcher(
                self,
                link=getattr(self.clients[client_id], "link", None)
            ),
            **kwargs
        )
        self.store_widget(widget)
        self.log_debug("Attached widget: %s" % id)
478981
def save target, weights, options = {}
      raise ":source need to be set" if options[:source].nil?
      source = options[:source]
      @sources[source] ||= []
      @sources[source] << target
      weights.keys.each do |key|
        add weights[key], key, target
      end
    end
1153166
def attach(self):
        
        log_recording = LogRecording(parent_object_id=self.parent_object_id, created_at=datetime.utcnow())
        self.log_recording_dao.remove(self.parent_object_id)
        self.log_recording_dao.update(log_recording)

        formatter = logging.Formatter(fmt='%(asctime)s %(levelname)-8s %(message)s',
                                      datefmt='%Y-%m-%d %H:%M:%S')
        self.setFormatter(formatter)
        self.logger.addHandler(self)
367435
def attach(obj, schema):
  """"""

  # We have a silly exception for lists, since they have no 'attach_schema'
  # method, and I don't feel like making a subclass for List just to add it.
  # So, we recursively search the list for tuples and attach the schema in
  # there.
  if framework.is_list(obj) and isinstance(schema, ListSchema):
    for x in obj:
      attach(x, schema.element_schema)
    return

  # Otherwise, the object should be able to handle its own schema attachment.
  getattr(obj, 'attach_schema', nop)(schema)
255140
public void attachMDS(Iterator<MultiDataSet> iterator) {
        log.debug("Attaching thread...");

        //Count the number of minibatches - used for reporting/debugging purposes
        if(iteratorDataSetCount.get() == null)
            iteratorDataSetCount.set(new AtomicInteger(0));
        AtomicInteger count = iteratorDataSetCount.get();
        count.set(0);

        // we're creating our Observable wrapper
        VirtualIterator<MultiDataSet> wrapped = new VirtualIterator<>(new CountingIterator<>(iterator, count));

        // and creating Observer which will be used to monitor progress within iterator
        BlockingObserver obs = new BlockingObserver(exceptionEncountered);
        wrapped.addObserver(obs);

        // putting that "somewhere"
        iteratorsMDS.add(wrapped);

        // storing observer into ThreadLocal, since we're going to use that later
        observer.set(obs);
    }
119536
def _create_attach_records(self, ids, attributes):
        
        records = []

        timed = self._has_pivot_column(self.created_at()) or self._has_pivot_column(
            self.updated_at()
        )

        for key, value in enumerate(ids):
            records.append(self._attacher(key, value, attributes, timed))

        return records
285642
def attach_mock(self, mock, attribute):
        
        mock._mock_parent = None
        mock._mock_new_parent = None
        mock._mock_name = ''
        mock._mock_new_name = None

        setattr(self, attribute, mock)
858754
def _attachToObject(self, anchorObj, relationName) :
		""
		#MutableSequence.__getattribute__(self, "develop")()
		self.develop()
		self._attachToObject(anchorObj, relationName)
747406
public OrganizationModel attachOrganization(OrganizationModel organizationModel, ArchiveModel archiveModel)
    {
        for (OrganizationModel existingOrganizationModel : archiveModel.getOrganizationModels())
        {
            if (existingOrganizationModel.equals(organizationModel))
                return organizationModel;
        }
        organizationModel.addArchiveModel(archiveModel);
        return organizationModel;
    }
422899
function attach(\SplObserver $observer)
    {
        if ($this->_observers == null)
        {
            $this->_observers = new \SplObjectStorage();
        }
        $this->_observers->attach($observer);
    }
831830
def save(self, obj):
        
        session = self.get_db_session()
        session.add(obj)
        session.commit()

        return obj
1115017
def addAttachment(self, title, attachment):
        
        self._attachments[title] = attachment
        self.resizeToContents()
35159
private static void attachToDecor(Activity activity, MenuDrawer menuDrawer) {
        ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
        ViewGroup decorChild = (ViewGroup) decorView.getChildAt(0);

        decorView.removeAllViews();
        decorView.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);

        menuDrawer.mContentContainer.addView(decorChild, decorChild.getLayoutParams());
    }
805732
protected function saveSubDataObjects()
    {
        foreach ($this->sub_data_objects as $name => $object) {
            $saver_method =
                'save' . str_replace(' ', '', ucwords(strtr($name, '_', ' ')));

            if (method_exists($this, $saver_method)) {
                call_user_func(array($this, $saver_method));
            }
        }

        /*
         * This handles the case where an internal property sub-dataobject also
         * exists in a sub-dataobject using a saver method. After the saver
         * method runs, the id of the internal property sub-dataobject is known
         * so we update it and then save this object's internal values again.
         */
        foreach (array_keys($this->internal_properties) as $name) {
            if ($this->hasSubDataObject($name)) {
                $sub_data_object = $this->getSubDataObject($name);
                if ($sub_data_object instanceof SwatDBDataObject) {
                    $id = $sub_data_object->getId();
                    $this->setInternalValue($name, $id);
                }
            }
        }
    }
948460
public synchronized void attach(SlabRef slab) {
        // Assume ownership of the caller's ref.  No need to call slab.addRef().
        checkState(!isAttached());

        _slab = slab;
        _slabConsumed = 0;
        _slabBytesConsumed = 0;
        _slabExpiresAt = System.currentTimeMillis() + Constants.SLAB_ROTATE_TTL.toMillis();
    }