Class GridFsObject.Options
java.lang.Object
org.springframework.data.mongodb.gridfs.GridFsObject.Options
- Enclosing interface:
- GridFsObject<ID,
CONTENT>
Additional, context relevant information.
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionchunkSize(int chunkSize) contentType(String contentType) Set the associated content type.static GridFsObject.Optionsfrom(com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Static factory method to createGridFsObject.Optionsby extracting information from the givenGridFSFile.intorg.bson.Documentmetadata(org.bson.Document metadata) static GridFsObject.Optionsnone()Static factory to create empty options.static GridFsObject.OptionsStatic factory method to createGridFsObject.Optionswith given content type.
-
Method Details
-
none
Static factory to create empty options.- Returns:
- new instance of
GridFsObject.Options.
-
typed
Static factory method to createGridFsObject.Optionswith given content type.- Parameters:
contentType-- Returns:
- new instance of
GridFsObject.Options.
-
from
public static GridFsObject.Options from(@Nullable com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Static factory method to createGridFsObject.Optionsby extracting information from the givenGridFSFile.- Parameters:
gridFSFile- can be null, returnsnone()in that case.- Returns:
- new instance of
GridFsObject.Options.
-
contentType
Set the associated content type.- Parameters:
contentType- must not be null.- Returns:
- new instance of
GridFsObject.Options.
-
metadata
- Parameters:
metadata-- Returns:
- new instance of
GridFsObject.Options.
-
chunkSize
- Parameters:
chunkSize- the file chunk size to use.- Returns:
- new instance of
GridFsObject.Options.
-
getMetadata
public org.bson.Document getMetadata()- Returns:
- never null.
-
getChunkSize
public int getChunkSize()- Returns:
- the chunk size to use.
-