MongoUserRepository

UserRepository based on MongoDB.

Author

Jan Müller
class MongoUserRepository(database: CoroutineDatabase) : UserRepository

Constructors

<init>
Link copied to clipboard
fun <init>(database: CoroutineDatabase)

Functions

addProfileImage
Link copied to clipboard
Adds a ProfileImage to a User from the repository.
open suspend override fun addProfileImage(id: String, profileImage: ProfileImage)
addTransaction
Link copied to clipboard
Adds a Transaction to a User from the repository.
open suspend override fun addTransaction(id: String, transaction: Transaction)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getAll
Link copied to clipboard
Retrieves all Users from the repository.
open suspend override fun getAll(): List<User>
getById
Link copied to clipboard
Retrieves a User from the repository.
open suspend override fun getById(id: String): User?
hashCode
Link copied to clipboard
open override fun hashCode(): Int
hasUserWithId
Link copied to clipboard
Checks if the repository contains a specific User.
open suspend override fun hasUserWithId(id: String): Boolean
insert
Link copied to clipboard
Inserts a User into the repository.
open suspend override fun insert(user: User)
removeById
Link copied to clipboard
Removes a User from the repository.
open suspend override fun removeById(id: String)
removeProfileImage
Link copied to clipboard
Removes the ProfileImage of a User from the repository.
open suspend override fun removeProfileImage(id: String)
toString
Link copied to clipboard
open override fun toString(): String
update
Link copied to clipboard
Updates a User from the repository.
open suspend override fun update(id: String, name: String, isAdmin: Boolean, password: String?)