本文整理了Java中com.mongodb.gridfs.GridFS.getFilesCollection()
方法的一些代码示例,展示了GridFS.getFilesCollection()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GridFS.getFilesCollection()
方法的具体详情如下:
包路径:com.mongodb.gridfs.GridFS
类名称:GridFS
方法名:getFilesCollection
[英]Gets the DBCollection in which the file's metadata is stored.
[中]获取存储文件元数据的DBCollection。
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Removes file from GridFS i.e. removes documents from files and chunks collections.
*/
void remove() {
fs.getFilesCollection().remove(new BasicDBObject("_id", id));
fs.getChunksCollection().remove(new BasicDBObject("files_id", id));
}
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Saves the file entry to the files collection
*
* @throws MongoException if there's a failure
*/
public void save() {
if (fs == null) {
throw new MongoException("need fs");
}
fs.getFilesCollection().save(this);
}
代码示例来源:origin: org.mongodb/mongodb-driver
/**
* Saves the file entry to the files collection
*
* @throws MongoException if there's a failure
*/
public void save() {
if (fs == null) {
throw new MongoException("need fs");
}
fs.getFilesCollection().save(this);
}
代码示例来源:origin: org.mongodb/mongodb-driver
/**
* Removes file from GridFS i.e. removes documents from files and chunks collections.
*/
void remove() {
fs.getFilesCollection().remove(new BasicDBObject("_id", id));
fs.getChunksCollection().remove(new BasicDBObject("files_id", id));
}
内容来源于网络,如有侵权,请联系作者删除!