Package com.onec.ui.comments
Class CommentService
java.lang.Object
com.onec.ui.comments.CommentService
Persistence for
onec_comments: the framework-owned thread store behind the
/api/comments endpoint. It is infrastructure (like onec_schema_history), not a
modelled catalog — so it is created with a plain CREATE TABLE IF NOT EXISTS at startup
rather than through the metadata diff engine, and never appears in the navigation or REST model.
A thread is keyed by (entity_type, entity_name, entity_id). Deletes are soft (the row
stays for audit with _deleted = true); reads filter them out.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(String entityType, String entityName, UUID entityId, String authorId, String authorName, String body) Append a comment and return it as stored.A single comment by id (including soft-deleted ones), for authorization checks.The live thread for one entity, oldest comment first.booleansoftDelete(UUID id) Soft-delete a comment; returns false when it doesn't exist or was already deleted.
-
Constructor Details
-
CommentService
public CommentService(org.jdbi.v3.core.Jdbi jdbi)
-
-
Method Details
-
list
The live thread for one entity, oldest comment first. -
add
public Comment add(String entityType, String entityName, UUID entityId, String authorId, String authorName, String body) Append a comment and return it as stored. -
find
A single comment by id (including soft-deleted ones), for authorization checks. -
softDelete
Soft-delete a comment; returns false when it doesn't exist or was already deleted.
-