Package dev.getelements.elements.sdk.dao
Interface LargeObjectDao
- All Known Implementing Classes:
MongoLargeObjectDao
public interface LargeObjectDao
-
Method Summary
Modifier and TypeMethodDescriptioncreateLargeObject
(LargeObject largeObject) Creates a newLargeObject
.void
deleteLargeObject
(String objectId) Deletes an instance ofLargeObject
from the database.findLargeObject
(String objectId) Finds aLargeObject
with the supplied object id, returning a value equivalent toOptional.empty()
if the object cannot be found.default LargeObject
getLargeObject
(String objectId) Finds aLargeObject
with the supplied object id, throwing an instance ofLargeObjectNotFoundException
of the object cannot be found.updateLargeObject
(LargeObject largeObject) Updates an existingLargeObject
.
-
Method Details
-
findLargeObject
Finds aLargeObject
with the supplied object id, returning a value equivalent toOptional.empty()
if the object cannot be found.- Parameters:
objectId
- the object id- Returns:
- the
Optional<LargeObject>
-
getLargeObject
Finds aLargeObject
with the supplied object id, throwing an instance ofLargeObjectNotFoundException
of the object cannot be found.- Parameters:
objectId
- the object id- Returns:
- the
Optional<LargeObject>
-
createLargeObject
Creates a newLargeObject
.- Parameters:
largeObject
- the large object to create- Returns:
- the
LargeObject
as created in the database
-
updateLargeObject
Updates an existingLargeObject
.- Parameters:
largeObject
- the large object to create- Returns:
- the
LargeObject
as created in the database
-
deleteLargeObject
Deletes an instance ofLargeObject
from the database. Returning the object just before deletion.- Parameters:
objectId
- the object ID
-