package be.simplenotes.domain.usecases.repositories import be.simplenotes.domain.model.Note import be.simplenotes.domain.model.PersistedNote import be.simplenotes.domain.model.PersistedNoteMetadata import java.util.* interface NoteRepository { fun findAll( userId: Int, limit: Int = 20, offset: Int = 0, tag: String? = null, deleted: Boolean = false ): List fun count(userId: Int, tag: String? = null, deleted: Boolean = false): Int fun delete(userId: Int, uuid: UUID, permanent: Boolean = false): Boolean fun restore(userId: Int, uuid: UUID): Boolean // These methods only access notes where `Notes.deleted = false` fun getTags(userId: Int): List fun exists(userId: Int, uuid: UUID): Boolean fun create(userId: Int, note: Note): PersistedNote fun find(userId: Int, uuid: UUID): PersistedNote? fun update(userId: Int, uuid: UUID, note: Note): PersistedNote? }