mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 07:53:15 +00:00
タイトルキャッシュ更新メソッド追加
This commit is contained in:
parent
dcfb22f6a0
commit
6fdef14eec
|
@ -53,6 +53,8 @@ public interface LacertaLibrary {
|
|||
|
||||
CompletableFuture<Void> combineDocument(String parentId, String childId);
|
||||
|
||||
CompletableFuture<Void> updateTitleCache(String parentId, String childId, String titleCache);
|
||||
|
||||
CompletableFuture<Void> uncombineDocument(String parentId, String childId);
|
||||
|
||||
// CompletableFuture<Void> combineDocument(String parentId, ArrayList<String> childIdList);
|
||||
|
|
|
@ -389,6 +389,21 @@ public class LacertaLibraryImpl implements LacertaLibrary {
|
|||
logger.debug("LacertaLibraryImpl", "Database Query: Inserted ToxiDocumentEntity");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Void> updateTitleCache(String parentId, String documentId, String titleCache) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
ToxiDocumentEntity toxiDocumentEntity = database.toxiDocumentDao().findByParentIdAndChildId(parentId, documentId);
|
||||
if (toxiDocumentEntity == null) {
|
||||
logger.warn("LacertaLibraryImpl", "ToxiDocumentEntity is not found.");
|
||||
return null;
|
||||
}
|
||||
toxiDocumentEntity.titleCache = titleCache;
|
||||
database.toxiDocumentDao().update(toxiDocumentEntity);
|
||||
logger.debug("LacertaLibraryImpl", "Database Query: Updated ToxiDocumentEntity");
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompletableFuture<Void> uncombineDocument(String parentId, String childId) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user