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.voiddeleteLargeObject(String objectId) Deletes an instance ofLargeObjectfrom the database.findLargeObject(String objectId) Finds aLargeObjectwith the supplied object id, returning a value equivalent toOptional.empty()if the object cannot be found.default LargeObjectgetLargeObject(String objectId) Finds aLargeObjectwith the supplied object id, throwing an instance ofLargeObjectNotFoundExceptionof the object cannot be found.updateLargeObject(LargeObject largeObject) Updates an existingLargeObject.
-
Method Details
-
findLargeObject
Finds aLargeObjectwith 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 aLargeObjectwith the supplied object id, throwing an instance ofLargeObjectNotFoundExceptionof 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
LargeObjectas created in the database
-
updateLargeObject
Updates an existingLargeObject.- Parameters:
largeObject- the large object to create- Returns:
- the
LargeObjectas created in the database
-
deleteLargeObject
Deletes an instance ofLargeObjectfrom the database. Returning the object just before deletion.- Parameters:
objectId- the object ID
-