Create Interfaces in which basic Room-operations are defined #2

Closed
opened 2022-04-28 20:03:37 +02:00 by Dutch · 1 comment
Owner

Create the following Interfaces and let them be automatically implemented when detected on a DaoEx-Class

  • IInsert<T>

    1. insertAwait(entity: T): Long
    2. insertWithJoinsAwait(entity: T, removeIfNull: Boolean = false): Long
    3. insertWithJoinsAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long
  • IRead<T>

    1. getByIdAwait(id: Long): T?
    2. getByIdWithChildrenAwait(id: Long, vararg fields: String): T?
  • IUpdate<T>

    1. updateAwait(entity: T): Long
    2. updateWithChildrenAwait(entity: T, removeIfNull: Boolean = false): Long
    3. updateWithChildrenAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long
  • IDelete<T>

    1. deleteAwait(entity: T): Long
    2. deleteWithJoinsAwait(entity: T, removeIfNull: Boolean = false): Long
    3. deleteWithJoinsAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long
Create the following Interfaces and let them be automatically implemented when detected on a DaoEx-Class - [x] **IInsert\<T>** 1. insertAwait(entity: T): Long 2. insertWithJoinsAwait(entity: T, removeIfNull: Boolean = false): Long 3. insertWithJoinsAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long - [x] **IRead\<T>** 1. getByIdAwait(id: Long): T? 2. getByIdWithChildrenAwait(id: Long, vararg fields: String): T? - [x] **IUpdate\<T>** 1. updateAwait(entity: T): Long 2. updateWithChildrenAwait(entity: T, removeIfNull: Boolean = false): Long 3. updateWithChildrenAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long - [x] **IDelete\<T>** 1. deleteAwait(entity: T): Long 2. deleteWithJoinsAwait(entity: T, removeIfNull: Boolean = false): Long 3. deleteWithJoinsAwait(entity: T, vararg fields: String, removeIfNull: Boolean = false): Long
Dutch added this to the Release v1.0 project 2022-12-20 18:08:34 +01:00
Author
Owner

Todo: Check if needed. It would probably be easier/better to simply include all the methods in the base dao as protected.

This would come really handy with the automatical generation of DaoEx-classes

~~Todo: Check if needed. It would probably be easier/better to simply include all the methods in the base dao as protected.~~ This would come really handy with the automatical generation of DaoEx-classes
Dutch self-assigned this 2022-12-20 18:23:59 +01:00
Dutch added this to the v1.0 milestone 2022-12-20 18:41:52 +01:00
Dutch closed this issue 2023-01-03 11:56:13 +01:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Dutch/RoomEx#2
No description provided.