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.getLargeObjects(int offset, int count, String search) Gets a pagination of large objects based on the specified criteriaupdateLargeObject(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>
-
getLargeObjects
Gets a pagination of large objects based on the specified criteria- Parameters:
offset- - Pagination offsetcount- - Pagination max objectssearch- - Matching substring in path or MIME type- Returns:
- the pagination results, if any
-
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
-