I think it's just legal that these exceptions (like RecordNotFoundException) extend from a base exception class (DatabaseException). Right?
Do I need some kind of synchronization / locking for the reading / writing to the provided database file? I will use a record cache, so at startup I will read the whole database and put the records in a Map. If the application terminates a shutdown hook will write the record cache back to disk. Only one thread will do this, so what precautions should I take?
What about the validation of the database file at startup?
What about the deleted property of a record? Use it in the Room transfer object? It's also in the record itself and makes it easier to write back the data to the file at application termination. On the other hand...it's a kind of flag indicating if a record is marked as deleted, so I don't see it as a 'normal' property...
Roberto Perillo wrote:Now, you said that you won't use a TO in the .db package. When do you plan to transform from String  to Room object?
Dennis Grimbergen wrote:A client can call book and search in my business layer. There I use a Room TO.