Module de.seggebaeing.sqlanalyzer
Interface BDOService<B extends BusinessDomainObject>
- Type Parameters:
B
- the type of business domain object managed by this service
- All Known Implementing Classes:
GeneratedQueryService
,LLMService
,PromptService
,PromptTypeService
,SampleQueryService
public interface BDOService<B extends BusinessDomainObject>
Service-layer abstraction for managing
BusinessDomainObject
instances.
Provides basic CRUD-style operations and an optional dependency query for objects that hold direct references to a given BDO.
- Since:
- 1.0
- Author:
- Felix Seggebäing
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes the given business domain object.getAll()
Returns all managed business domain objects of typeB
.default List
<BusinessDomainObject> getDependants
(B bdo) Returns business objects that hold a direct reference to the given BDO.void
saveOrUpdate
(B bdo) Persists a new business object or updates an existing one.
-
Method Details
-
getAll
Returns all managed business domain objects of typeB
.- Returns:
- a set of BDOs; may be empty
-
delete
Deletes the given business domain object.- Parameters:
bdo
- the object to remove
-
saveOrUpdate
Persists a new business object or updates an existing one.- Parameters:
bdo
- the object to save or update
-
getDependants
Returns business objects that hold a direct reference to the given BDO.Default implementation returns an empty list; override in services that track references.
- Parameters:
bdo
- the source business object- Returns:
- list of direct dependants; empty if none
-