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.Options
from
(com.mongodb.client.gridfs.model.GridFSFile gridFSFile) Static factory method to createGridFsObject.Options
by extracting information from the givenGridFSFile
.int
org.bson.Document
metadata
(org.bson.Document metadata) static GridFsObject.Options
none()
Static factory to create empty options.static GridFsObject.Options
Static factory method to createGridFsObject.Options
with given content type.
-
Method Details
-
none
Static factory to create empty options.- Returns:
- new instance of
GridFsObject.Options
.
-
typed
Static factory method to createGridFsObject.Options
with 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.Options
by 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.
-