Class GeneratedQueryService

java.lang.Object
de.seggebaeing.sqlanalyzer.logic.service.GeneratedQueryService
All Implemented Interfaces:
BDOService<GeneratedQuery>

public class GeneratedQueryService extends Object implements BDOService<GeneratedQuery>
Service layer for managing GeneratedQuery business objects.

Maps between GeneratedQuery and GeneratedQueryDTO via GeneratedQueryMapper and persists through GeneratedQueryDAOImpl. Implements a singleton (use getInstance()) and synchronizes public operations for basic thread safety.

Uses the default BDOService.getDependants(BusinessDomainObject) implementation, which returns an empty list.

Since:
1.0
Author:
Felix Seggebäing
  • Method Details

    • getInstance

      public static GeneratedQueryService getInstance()
    • getAll

      public Set<GeneratedQuery> getAll()
      Retrieves all persisted generated queries and maps them to business objects.

      Thread-safe: synchronized to guard DAO/mapper access.

      Specified by:
      getAll in interface BDOService<GeneratedQuery>
      Returns:
      a set of GeneratedQuery; may be empty
    • delete

      public void delete(GeneratedQuery bdo)
      Deletes the given generated query by mapping it to its DTO and delegating to the DAO.

      Thread-safe: synchronized to guard DAO/mapper access.

      Specified by:
      delete in interface BDOService<GeneratedQuery>
      Parameters:
      bdo - the generated query to delete
    • saveOrUpdate

      public void saveOrUpdate(GeneratedQuery bdo)
      Saves a new generated query or updates an existing one by mapping it to its DTO and delegating to the DAO.

      Thread-safe: synchronized to guard DAO/mapper access.

      Specified by:
      saveOrUpdate in interface BDOService<GeneratedQuery>
      Parameters:
      bdo - the generated query to save or update