Module de.seggebaeing.sqlanalyzer
Class GeneratedQueryService
java.lang.Object
de.seggebaeing.sqlanalyzer.logic.service.GeneratedQueryService
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionvoid
delete
(GeneratedQuery bdo) Deletes the given generated query by mapping it to its DTO and delegating to the DAO.getAll()
Retrieves all persisted generated queries and maps them to business objects.static GeneratedQueryService
void
Saves a new generated query or updates an existing one by mapping it to its DTO and delegating to the DAO.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.seggebaeing.sqlanalyzer.logic.service.BDOService
getDependants
-
Method Details
-
getInstance
-
getAll
Retrieves all persisted generated queries and maps them to business objects.Thread-safe: synchronized to guard DAO/mapper access.
- Specified by:
getAll
in interfaceBDOService<GeneratedQuery>
- Returns:
- a set of
GeneratedQuery
; may be empty
-
delete
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 interfaceBDOService<GeneratedQuery>
- Parameters:
bdo
- the generated query to delete
-
saveOrUpdate
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 interfaceBDOService<GeneratedQuery>
- Parameters:
bdo
- the generated query to save or update
-