Interface DatabaseEntryReadService
- All Known Implementing Classes:
DatabaseEntryReadServiceImpl
DatabaseEntry.
Phase 3 of the DatabaseEntryService decomposition (strangler fig). Houses the
DAO-bound read cluster previously implemented directly on the
DatabaseEntryServiceImpl facade: load(Long), loadAll(),
countAll(), findByAccession(String) and the only non-inherited facade
read, findLatestByAccession(String). All methods delegate to
DatabaseEntryDao and orchestrate no other collaborators.
Write-side methods (create, findOrCreate, remove, plus the
inherited BaseImmutableService mutators) and the FilteringVoEnabledService
VO-with-filters surface stay on the DatabaseEntryService facade. (The facade is
what DatabaseEntryArgService -- and through it, AbstractEntityArgService
-- is parameterised on; that filtering surface is not part of the read decomp.)
Note: DatabaseEntry is coupled to ExternalDatabase via the persister
cache mechanism, and CommonPersister.persistDatabaseEntry stays on the legacy
persister path pending the cache-lift pilot. This read service is purely facade-side;
the persister arm is not affected.
Callers should generally keep using DatabaseEntryService as the facade -- the
facade delegates to this service. Direct injection is appropriate where a class is
logically read-only (REST endpoints, CLIs, browser controllers, intra-core readers).
ACL / @Secured annotations live on DatabaseEntryService (the
caller-facing facade interface); enforcement happens at the facade proxy boundary, so
this interface is intentionally unsecured. (Historically DatabaseEntry reads were
@Secured("IS_AUTHENTICATED_ANONYMOUSLY") and writes @Secured("GROUP_USER"),
but the current facade carries no explicit @Secured on these methods -- the
read/write split here is a refactor only, not an ACL change.)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlongcountAll()findByAccession(String accession) findLatestByAccession(String accession) Find the latest (as per its version or ID) database entry by accession.loadAll()
-
Method Details
-
load
-
loadAll
Collection<DatabaseEntry> loadAll() -
countAll
long countAll() -
findByAccession
- See Also:
-
findLatestByAccession
Find the latest (as per its version or ID) database entry by accession.
-