|
Spring Data Document | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.mongodb.gridfs.GridFsTemplate
public class GridFsTemplate
GridFsOperations implementation to store content into MongoDB GridFS.
| Field Summary |
|---|
| Fields inherited from interface org.springframework.core.io.support.ResourcePatternResolver |
|---|
CLASSPATH_ALL_URL_PREFIX |
| Fields inherited from interface org.springframework.core.io.ResourceLoader |
|---|
CLASSPATH_URL_PREFIX |
| Constructor Summary | |
|---|---|
GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter)
Creates a new GridFsTemplate using the given MongoDbFactory and MongoConverter. |
|
GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter,
String bucket)
Creates a new GridFsTemplate using the given MongoDbFactory and MongoConverter. |
|
| Method Summary | |
|---|---|
void |
delete(Query query)
Deletes all files matching the given Query. |
List<GridFSDBFile> |
find(Query query)
Returns all files matching the given query. |
GridFSDBFile |
findOne(Query query)
Returns a single file matching the given query or null in case no file matches. |
ClassLoader |
getClassLoader()
|
GridFsResource |
getResource(String location)
Returns all GridFsResource with the given file name. |
GridFsResource[] |
getResources(String locationPattern)
Returns all GridFsResources matching the given file name pattern. |
GridFSFile |
store(InputStream content,
String filename)
Stores the given content into a file with the given name. |
GridFSFile |
store(InputStream content,
String filename,
DBObject metadata)
Stores the given content into a file with the given name using the given metadata. |
GridFSFile |
store(InputStream content,
String filename,
Object metadata)
Stores the given content into a file with the given name using the given metadata. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter)
GridFsTemplate using the given MongoDbFactory and MongoConverter.
dbFactory - must not be null.converter - must not be null.
public GridFsTemplate(MongoDbFactory dbFactory,
MongoConverter converter,
String bucket)
GridFsTemplate using the given MongoDbFactory and MongoConverter.
dbFactory - must not be null.converter - must not be null.bucket - | Method Detail |
|---|
public GridFSFile store(InputStream content,
String filename)
GridFsOperations
store in interface GridFsOperationscontent - must not be null.filename - must not be null or empty.
GridFSFile just created
public GridFSFile store(InputStream content,
String filename,
Object metadata)
GridFsOperations
store in interface GridFsOperationscontent - must not be null.filename - must not be null or empty.
GridFSFile just created
public GridFSFile store(InputStream content,
String filename,
DBObject metadata)
GridFsOperations
store in interface GridFsOperationscontent - must not be null.filename - must not be null or empty.metadata - must not be null.
GridFSFile just createdpublic List<GridFSDBFile> find(Query query)
GridFsOperations
find in interface GridFsOperationspublic GridFSDBFile findOne(Query query)
GridFsOperations
findOne in interface GridFsOperationspublic void delete(Query query)
GridFsOperationsQuery.
delete in interface GridFsOperationspublic ClassLoader getClassLoader()
getClassLoader in interface ResourceLoaderpublic GridFsResource getResource(String location)
GridFsOperationsGridFsResource with the given file name.
getResource in interface ResourceLoadergetResource in interface GridFsOperationsResourceLoader.getResource(String)public GridFsResource[] getResources(String locationPattern)
GridFsOperationsGridFsResources matching the given file name pattern.
getResources in interface ResourcePatternResolvergetResources in interface GridFsOperationsResourcePatternResolver.getResources(String)
|
Spring Data Document | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||