Class TapeCatalogRepository
java.lang.Object
fr.gouv.vitam.storage.cold.server.simulator.repository.TapeCatalogRepository
Repository for TapeCatalogModel collection
Manages CRUD operations for tape catalog persistence
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAll()Find all tape catalogsFind tape catalog by tape code (_id)findBySlotNumber(int slotNumber) Find tape catalog by slot numbervoidsave(TapeCatalogModel tapeCatalog) Save or update tape catalog entry
-
Field Details
-
COLLECTION_NAME
- See Also:
-
-
Constructor Details
-
TapeCatalogRepository
public TapeCatalogRepository(com.mongodb.client.MongoDatabase mongoDatabase)
-
-
Method Details
-
save
Save or update tape catalog entry- Parameters:
tapeCatalog- the tape catalog to save- Throws:
InaTapeProxyRepositoryException
-
findById
Find tape catalog by tape code (_id)- Parameters:
tapeCode- the tape code (_id)- Returns:
- Optional containing the tape catalog if found in that slot
- Throws:
InaTapeProxyRepositoryException
-
findBySlotNumber
public Optional<TapeCatalogModel> findBySlotNumber(int slotNumber) throws InaTapeProxyRepositoryException Find tape catalog by slot number- Parameters:
slotNumber- the slot number- Returns:
- Optional containing the tape catalog if found in that slot
- Throws:
InaTapeProxyRepositoryException
-
findAll
Find all tape catalogs- Returns:
- list of all tape catalogs
- Throws:
InaTapeProxyRepositoryException
-