mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
インターフェース変更, Impl変更
This commit is contained in:
parent
ff5ef8611a
commit
0a96a9443d
|
@ -10,6 +10,7 @@ import one.nem.lacerta.model.LibraryItemPage;
|
||||||
import one.nem.lacerta.model.PublicPath;
|
import one.nem.lacerta.model.PublicPath;
|
||||||
import one.nem.lacerta.model.document.DocumentDetail;
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
import one.nem.lacerta.model.document.tag.DocumentTag;
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
import one.nem.lacerta.model.pref.ToxiDocumentModel;
|
||||||
|
|
||||||
public interface LacertaLibrary {
|
public interface LacertaLibrary {
|
||||||
|
|
||||||
|
@ -54,5 +55,5 @@ public interface LacertaLibrary {
|
||||||
//
|
//
|
||||||
// CompletableFuture<Void> uncombineDocument(String parentId, ArrayList<String> childIdList);
|
// CompletableFuture<Void> uncombineDocument(String parentId, ArrayList<String> childIdList);
|
||||||
|
|
||||||
CompletableFuture<ArrayList<String>> getCombinedDocumentIdList(String parentId);
|
CompletableFuture<ArrayList<ToxiDocumentModel>> getCombinedDocumentToxiList(String parentId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ import one.nem.lacerta.model.ListItemType;
|
||||||
import one.nem.lacerta.model.PublicPath;
|
import one.nem.lacerta.model.PublicPath;
|
||||||
import one.nem.lacerta.model.document.DocumentDetail;
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
import one.nem.lacerta.model.document.tag.DocumentTag;
|
import one.nem.lacerta.model.document.tag.DocumentTag;
|
||||||
|
import one.nem.lacerta.model.pref.ToxiDocumentModel;
|
||||||
import one.nem.lacerta.source.database.LacertaDatabase;
|
import one.nem.lacerta.source.database.LacertaDatabase;
|
||||||
import one.nem.lacerta.source.database.common.DateTypeConverter;
|
import one.nem.lacerta.source.database.common.DateTypeConverter;
|
||||||
import one.nem.lacerta.source.database.entity.DocumentEntity;
|
import one.nem.lacerta.source.database.entity.DocumentEntity;
|
||||||
|
@ -341,14 +342,20 @@ public class LacertaLibraryImpl implements LacertaLibrary {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompletableFuture<ArrayList<String>> getCombinedDocumentIdList(String parentId) {
|
public CompletableFuture<ArrayList<ToxiDocumentModel>> getCombinedDocumentToxiList(String parentId) {
|
||||||
return CompletableFuture.supplyAsync(() -> {
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
List<ToxiDocumentEntity> toxiDocumentEntities = database.toxiDocumentDao().findByParentId(parentId);
|
List<ToxiDocumentEntity> toxiDocumentEntities = database.toxiDocumentDao().findByParentId(parentId);
|
||||||
ArrayList<String> documentIdList = new ArrayList<>();
|
ArrayList<ToxiDocumentModel> toxiDocumentModels = new ArrayList<>();
|
||||||
for (ToxiDocumentEntity toxiDocumentEntity : toxiDocumentEntities) {
|
for (ToxiDocumentEntity toxiDocumentEntity : toxiDocumentEntities) {
|
||||||
documentIdList.add(toxiDocumentEntity.childDocumentId);
|
ToxiDocumentModel toxiDocumentModel = new ToxiDocumentModel();
|
||||||
|
toxiDocumentModel.setParentDocumentId(toxiDocumentEntity.parentDocumentId);
|
||||||
|
toxiDocumentModel.setChildDocumentId(toxiDocumentEntity.childDocumentId);
|
||||||
|
toxiDocumentModel.setOrder(toxiDocumentEntity.order);
|
||||||
|
toxiDocumentModel.setActive(toxiDocumentEntity.isActive);
|
||||||
|
toxiDocumentModel.setTitleCache(toxiDocumentEntity.titleCache);
|
||||||
|
toxiDocumentModels.add(toxiDocumentModel);
|
||||||
}
|
}
|
||||||
return documentIdList;
|
return toxiDocumentModels;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user