Store a collection of objects.
768132
public Collection storeObjects(Collection objects)
    {
        PersistenceBroker broker = null;
        Collection stored;
        try
        {
            broker = getBroker();
            stored = this.storeObjects(broker, objects);
        }
        finally
        {
            if (broker != null) broker.close();
        }
        return stored;
    }
684280
def save_data(self):
        """"""
        filename = os.path.join(
            self._get_prefix(),
            self.model.site
        )
        self.store.store_json(
            filename,
            self.model.get_dict()
        )
927974
def store(self, secrets, job):
        # type: (List[Text], MutableMapping[Text, Any]) -> None
        """"""
        for j in job:
            if j in secrets:
                job[j] = self.add(job[j])
172045
def add_collection(collection,
                   cache_size=1000,
                   cache_cls=LRUCache,
                   **cache_args):
    """"""
    assert collection not in _db
    cache = cache_cls(maxsize=cache_size,
                      missing=lambda id: load_object(collection, id),
                      **cache_args)
    _db[collection] = aadict(cache=cache, indexes={})
631674
def apply(self, collection, data):
        """"""
        value = self.value(data)
        if value is self.default:
            return collection
        return [o for o in collection if getattr(o, self.name, None) == value]
862868
def save(self, entity):
        """"""
        assert isinstance(entity, Entity), " entity must have an instance of Entity"
        return self.__collection.save(entity.as_dict())
1195446
void store(int A, int r, int B) {
        getB(A, r).add(B);
        getA(B, r).add(A);
    }
623345
def save(self, request, resource=None, **kwargs):
        """"""
        resources = resource if isinstance(resource, list) else [resource]
        for obj in resources:
            obj.save()
        return resource
774386
def store(data, arr, start=0, stop=None, offset=0, blen=None):
    """"""

    # setup
    blen = _util.get_blen_array(data, blen)
    if stop is None:
        stop = len(data)
    else:
        stop = min(stop, len(data))
    length = stop - start
    if length < 0:
        raise ValueError('invalid stop/start')

    # copy block-wise
    for bi in range(start, stop, blen):
        bj = min(bi+blen, stop)
        bl = bj - bi
        arr[offset:offset+bl] = data[bi:bj]
        offset += bl
339743
public Object storeObject(Object object)
    {
        PersistenceBroker broker = getBroker();
        try
        {
            broker.store(object);
        }
        finally
        {
            if (broker != null) broker.close();
        }
        return object;
    }
859659
def objects_to_record(self):
        """"""

        o = self.get_object()

        o.about = self._bundle.metadata.about
        o.identity = self._dataset.identity.ident_dict
        o.names = self._dataset.identity.names_dict
        o.contacts = self._bundle.metadata.contacts

        self.set_object(o)
417243
public static void copyToArray(Collection<Object> collection, Object[] objects)
	{
		System.arraycopy(collection.toArray(), 0, objects, 0, objects.length);
	}
872066
def collections(self, values):
        """"""
        # if cache server is configured, save collection list
        if self.cache:
            self.cache.set(
                self.app.config['COLLECTIONS_CACHE_KEY'], values)
823392
def store(self, record, value):
        """"""
        if record._values[self.name].get(record.id):
            tuples2ids(value, record._values[self.name][record.id])
        else:
            record._values[self.name][record.id] = tuples2ids(value, [])
588041
private Object serializeCollection(Collection pArg) {
        JSONArray array = new JSONArray();
        for (Object value : ((Collection) pArg)) {
            array.add(serializeArgumentToJson(value));
        }
        return array;
    }
204764
def save(self, collection):
        
        assert isinstance(collection, predix.data.asset.AssetCollection), "Expected AssetCollection"
        collection.validate()
        self.put_collection(collection.uri, collection.__dict__)
1043127
def put(self, key, value):
    '''
    '''
    if value is None:
      self.delete(key)
    else:
      self._collection(key)[key] = value