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 Type
    Method
    Description
    void
    delete(B bdo)
    Deletes the given business domain object.
    Returns all managed business domain objects of type B.
    Returns business objects that hold a direct reference to the given BDO.
    void
    Persists a new business object or updates an existing one.
  • Method Details

    • getAll

      Set<B> getAll()
      Returns all managed business domain objects of type B.
      Returns:
      a set of BDOs; may be empty
    • delete

      void delete(B bdo)
      Deletes the given business domain object.
      Parameters:
      bdo - the object to remove
    • saveOrUpdate

      void saveOrUpdate(B bdo)
      Persists a new business object or updates an existing one.
      Parameters:
      bdo - the object to save or update
    • getDependants

      default List<BusinessDomainObject> getDependants(B bdo)
      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