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