Handles persistent Collection classes.
427288
@SuppressWarnings("rawtypes")
	private final void doPersistentContainer(Object container) {
        if (container instanceof DBArrayList) {
            doCollection((DBArrayList)container);
        } else if (container instanceof DBLargeVector) {
//            doEnumeration(((DBLargeVector)container).elements(), container);
            doCollection(((DBLargeVector)container));
        } else if (container instanceof DBHashMap) {
            DBHashMap t = (DBHashMap)container;
            doCollection(t.keySet());
            doCollection(t.values());
        } else {
            throw new IllegalArgumentException(
                    "Unrecognized persistent container in OGT: "
                    + container.getClass());
        }
    }
496773
public void setPersistenceClass(String persistenceClass) throws Exception {
        this.persistenceClass = persistenceClass;
        if (persistenceClass != null) {
            store = PersistenceUtils.getPersistenceStore(this, persistenceClass);
        }
    }
762133
private ArrayList handleDependentCollections(Identity oid, Object obj,
            Object[] origCollections, Object[] newCollections,
            Object[] newCollectionsOfObjects)
            throws LockingException
    {
        ClassDescriptor mif = _pb.getClassDescriptor(obj.getClass());
        Collection colDescs = mif.getCollectionDescriptors();
        ArrayList newObjects = new ArrayList();
        int count = 0;

        for (Iterator it = colDescs.iterator(); it.hasNext(); count++)
        {
            CollectionDescriptor cds = (CollectionDescriptor) it.next();

            if (cds.getOtmDependent())
            {
                ArrayList origList = (origCollections == null ? null
                                        : (ArrayList) origCollections[count]);
                ArrayList newList = (ArrayList) newCollections[count];

                if (origList != null)
                {
                    for (Iterator it2 = origList.iterator(); it2.hasNext(); )
                    {
                        Identity origOid = (Identity) it2.next();

                        if ((newList == null) || !newList.contains(origOid))
                        {
                            markDelete(origOid, oid, true);
                        }
                    }
                }

                if (newList != null)
                {
                    int countElem = 0;
                    for (Iterator it2 = newList.iterator(); it2.hasNext(); countElem++)
                    {
                        Identity newOid = (Identity) it2.next();

                        if ((origList == null) || !origList.contains(newOid))
                        {
                            ContextEntry entry = (ContextEntry) _objects.get(newOid);

                            if (entry == null)
                            {
                                ArrayList relCol = (ArrayList)
                                        newCollectionsOfObjects[count];
                                Object relObj = relCol.get(countElem);
                                insertInternal(newOid, relObj, LockType.WRITE_LOCK,
                                               true, null, new Stack());
                                newObjects.add(newOid);
                            }
                        }
                    }
                }
            }
        }

        return newObjects;
    }
1134356
private function garbageCollect()
    {
        $this->setDefaultValueBinder();

        // Force garbage collecting
        unset($this->sheetImports, $this->spreadsheet);

        $this->currentFile->delete();
    }
386671
public function persist()
    {
        $this->validate();

        if (!is_array($this->data)) {
            $this->data = [$this->data];
        }

        $append = $this instanceof StreamCollectorInterface;
        $patches = $this->jsonPatch->generateArrayAdd($this->getPath(), $this->data, $append);
        $this->dataSource->save($this->process, $patches);

        $this->data = [];
    }
1100813
public void retrieveCollections(Object newObj, ClassDescriptor cld, boolean forced) throws PersistenceBrokerException
    {
        doRetrieveCollections(newObj, cld, forced, false);
    }
1110172
protected function persistObjects()
    {
        $this->visitedDuringPersistence = new \SplObjectStorage();
        foreach ($this->aggregateRootObjects as $object) {
            $this->persistObject($object, null);
        }
        foreach ($this->changedEntities as $object) {
            $this->persistObject($object, null);
        }
    }
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)
208948
public Collection<Object> persist(Collection<Object> objColl) {
    if (null == objColl) {
      throw new IllegalArgumentException("object to save cannot be null");
    }

    objMapper.saveObjCollection(keyspace, objColl);
    return objColl;
  }
406245
def getCollectionClass(cls, name) :
        """'"""
        try :
            return cls.collectionClasses[name]
        except KeyError :
            raise KeyError( "There is no Collection Class of type: '%s'; currently supported values: [%s]" % (name, ', '.join(getCollectionClasses().keys())) )
1242328
private void processDatabaseFieldCollection(final Object databaseFieldCollection) {
        if (databaseFieldCollection == null || !isCastable("java.util.Collection", databaseFieldCollection.getClass())) {
            return;
        }

        final Collection<?> c = (Collection<?>) databaseFieldCollection;
        for (Object descriptor : c) {
            processDatabaseFieldObject(descriptor);
        }
    }
638900
public void apply()
    {
        System.out.println("The list of available products:");
        // build a query that select all objects of Class Product, without any further criteria
        // according to ODMG the Collection containing all instances of a persistent class is called "Extent"
        Query query = new QueryByCriteria(Product.class, null);
        try
        {
            // ask the broker to retrieve the Extent collection
            Collection allProducts = broker.getCollectionByQuery(query);
            // now iterate over the result to print each product
            java.util.Iterator iter = allProducts.iterator();
            while (iter.hasNext())
            {
                System.out.println(iter.next());
            }
        }
        catch (Throwable t)
        {
            t.printStackTrace();
        }
    }
1347327
private function loadReferenceManyCollectionInverseSide(PersistentCollectionInterface $collection)
    {
        $query     = $this->createReferenceInverseSideQuery($collection->getMapping(), $collection->getOwner());
        $documents = $query->execute()->toArray();

        foreach ($documents as $key => $document) {
            $collection->add($document);
        }
    }
73405
function(ferret, collection_name, callback) {
    _ready(ferret, function(err) {
        if (err) {
            process.nextTick(function() {
                callback(err)  
            })
        } else {
            if (ferret._collections[collection_name]) {
                process.nextTick(function() {
                    callback(null, ferret._collections[collection_name])
                })
            } else {
                ferret._db.collection(collection_name, function(err, collection){
                    if (!err) { ferret._collections[collection_name] = collection }
                    callback(err, collection)
                })
            }
        }
    })
}
740619
private void persistCaches() {
		for (Entry<CacheKey, Map<String, String>> cacheEntry : caches.entrySet()) {
			persistCache(cacheEntry.getKey().projectName, cacheEntry.getKey().projectVersion, cacheEntry.getValue());
		}
	}
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;
    }
14457
private function loadEmbedManyCollection(PersistentCollectionInterface $collection)
    {
        $rawData = $collection->getRawData();

        if ($rawData) {
            $mapping = $collection->getMapping();
            $owner   = $collection->getOwner();

            foreach ($rawData as $key => $data) {
                if ($mapping->type === Type::MAP) {
                    $key = (string)$key;
                } else {
                    $key = (int)$key;
                }

                $embeddedDocument = $this->uow->getAssociationPersister()->loadEmbed($mapping, $data, $owner, $key, $collection->isReadOnly());

                if ($mapping->type === Type::MAP) {
                    $collection->set($key, $embeddedDocument);
                } else {
                    $collection->add($embeddedDocument);
                }
            }
        }
    }