From ea0e52a602809eea326748bdadac6d78c7b27384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 25 Jan 2024 15:54:47 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=90=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/data/impl/LacertaLibraryImpl.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java index 9ad8fe81..58640876 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/LacertaLibraryImpl.java @@ -1,5 +1,7 @@ package one.nem.lacerta.data.impl; +import android.nfc.Tag; + import java.text.DateFormat; import java.text.SimpleDateFormat; import java.time.format.DateTimeFormatter; @@ -23,6 +25,7 @@ import one.nem.lacerta.source.database.LacertaDatabase; import one.nem.lacerta.source.database.common.DateTypeConverter; import one.nem.lacerta.source.database.entity.DocumentEntity; import one.nem.lacerta.source.database.entity.FolderEntity; +import one.nem.lacerta.source.database.entity.TagEntity; import one.nem.lacerta.utils.FeatureSwitch; import one.nem.lacerta.utils.LacertaLogger; @@ -206,6 +209,23 @@ public class LacertaLibraryImpl implements LacertaLibrary { }); } + // Converter + private DocumentTag convertTagEntityToDocumentTag(TagEntity tagEntity) { + DocumentTag documentTag = new DocumentTag(); + documentTag.setId(tagEntity.id); + documentTag.setName(tagEntity.tagName); + documentTag.setColor(tagEntity.color); + return documentTag; + } + + private TagEntity convertDocumentTagToTagEntity(DocumentTag documentTag) { + TagEntity tagEntity = new TagEntity(); + tagEntity.id = documentTag.getId(); + tagEntity.tagName = documentTag.getName(); + tagEntity.color = documentTag.getColor(); + return tagEntity; + } + @Override public CompletableFuture> getTagList() { return null; @@ -213,7 +233,9 @@ public class LacertaLibraryImpl implements LacertaLibrary { @Override public CompletableFuture createTag(DocumentTag tag) { - return null; + return CompletableFuture.supplyAsync(() -> { + + }); } @Override