Performs the logic for the enhancement needed to be performed to insert an Engineering Object into the EDB.
427337
private void performInsertEOLogic(EngineeringObjectModelWrapper model) {
        for (Field field : model.getForeignKeyFields()) {
            mergeEngineeringObjectWithReferencedModel(field, model);
        }
    }
2641
function add(object) {
	if (!_isValidAmbush(object)) {
		return false;
	}

	object.description = _cleanDescription(object.description);

	if (!_belongToAStoredAmbush(object.id)) {
		const newObject = Object.assign({}, object);
		goblin.ambush.push(newObject);
		goblin.ambushEmitter.emit('change', { type: 'add', value: newObject });
	} else {
		logger('AMBUSH_ADD_ERROR');
	}
}
919754
function fieldInsert(elem, field, val) {
        try {
            $(exports).triggerHandler('fieldInsert', [elem, field, val]);
        } catch (err) {
            console.error(err);
        }
        var array = _getArray(elem, field);
        array.push(val);
        _currentOperation.ops.push({
            op: OP_FIELD_INSERT,
            arg: {
                _id: elem._id,
                f: field,
                e: val._id,
                i: array.indexOf(val)
            }
        });
    }
212980
public EKBCommit addInsert(Object insert) {
        if (insert != null) {
            checkIfModel(insert);
            inserts.add((OpenEngSBModel) insert);
        }
        return this;
    }
427144
private void fillEDBObjectWithEngineeringObjectInformation(EDBObject object, OpenEngSBModel model)
        throws IllegalAccessException {
        if (!new AdvancedModelWrapper(model).isEngineeringObject()) {
            return;
        }
        for (Field field : model.getClass().getDeclaredFields()) {
            OpenEngSBForeignKey annotation = field.getAnnotation(OpenEngSBForeignKey.class);
            if (annotation == null) {
                continue;
            }
            String value = (String) FieldUtils.readField(field, model, true);
            if (value == null) {
                continue;
            }
            value = String.format("%s/%s", ContextHolder.get().getCurrentContextId(), value);
            String key = getEOReferenceStringFromAnnotation(annotation);
            object.put(key, new EDBObjectEntry(key, value, String.class));
        }
    }
1055220
function insert(elem) {
        try {
            $(exports).triggerHandler('insert', [elem]);
        } catch (err) {
            console.error(err);
        }
        var writer = new Writer();
        elem.save(writer);
        _currentOperation.ops.push({op: OP_INSERT, arg: writer.current});
    }
489160
def add(self, priority, observer, callble):
        
        #if observer is not None:
        ins = 0
        for pr, _, _ in self:
            if priority > pr:
                break
            ins += 1
        self._poc.insert(ins, (priority, weakref.ref(observer), callble))
1291282
def insert_completions(self, e): # (M-*)
        """
        completions = self._get_completions()
        b = self.begidx
        e = self.endidx
        for comp in completions:
            rep = [ c for c in comp ]
            rep.append(' ')
            self.l_buffer[b:e] = rep
            b += len(rep)
            e = b
        self.line_cursor = b    
        self.finalize()
1360201
private List<AdvancedModelWrapper> enhanceUpdates(List<AdvancedModelWrapper> updates,
            Map<Object, AdvancedModelWrapper> updated, EKBCommit commit) {
        List<AdvancedModelWrapper> additionalUpdates = new ArrayList<AdvancedModelWrapper>();
        for (AdvancedModelWrapper model : updates) {
            if (updated.containsKey(model.getCompleteModelOID())) {
                continue; // this model was already updated in this commit
            }
            if (model.isEngineeringObject()) {
                additionalUpdates.addAll(performEOModelUpdate(model.toEngineeringObject(), commit));
            }
            additionalUpdates.addAll(getReferenceBasedUpdates(model, updated, commit));
        }
        return additionalUpdates;
    }
1333153
protected function wizardAddProductClass()
    {
        $this->validatePrompt('title', $this->text('Title'), 'product_class');
        $this->validatePrompt('status', $this->text('Status'), 'product_class', 0);
        $this->validateComponent('product_class');
        $this->addProductClass();
    }
43786
def add_object(self, start, obj, object_size):
        

        self._store(start, obj, object_size, overwrite=False)
1118965
private void enhanceFAB(final FloatingActionButton fab, MotionEvent e) {
        if (hasAllItemsShown()) {
            if (fab.getVisibility() != View.VISIBLE) {
                fab.show();
            }
        }
    }
950424
def enhance(self):
        
        self.update({'puppetclasses':
                     SubDict(self.api, self.objName,
                             self.payloadObj, self.key,
                             SubItemPuppetClasses)})
        self.update({'parameters':
                     SubDict(self.api, self.objName,
                             self.payloadObj, self.key,
                             SubItemParameter)})
        self.update({'smart_class_parameters':
                    SubDict(self.api, self.objName,
                            self.payloadObj, self.key,
                            ItemSmartClassParameter)})
23310
private void cascadeMarkedForInsert()
    {
        // This list was used to avoid endless recursion on circular references
        List alreadyPrepared = new ArrayList();
        for(int i = 0; i < markedForInsertList.size(); i++)
        {
            ObjectEnvelope mod = (ObjectEnvelope) markedForInsertList.get(i);
            // only if a new object was found we cascade to register the dependent objects
            if(mod.needsInsert())
            {
                cascadeInsertFor(mod, alreadyPrepared);
                alreadyPrepared.clear();
            }
        }
        markedForInsertList.clear();
    }
71322
def addDepartment(self, dep):
        
        if api.is_uid(dep):
            dep = api.get_object_by_uid(dep)
        deps = self.getDepartments()
        if dep not in deps:
            return False
        deps.append(dep)
        self.setDepartments(deps)
        return True
711410
function processed(module) {
		pool.processed.push(module);

		if (!module.installed) {
			pool.install.push(module);
		}

		setImmediate(next);
	}
280497
def insert(cls, index, interceptor):
        
        cls._check(interceptor)
        cls._interceptors.insert(index, interceptor)