|
FOSSredder 0.5.0
|
#include <SqliteContractRepository.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| SqliteContractRepository (const std::string &dbPath) | |
| Create a contract repository for the database at the given path. | |
| SqliteContractRepository (std::shared_ptr< SqliteDb > db) | |
| Create a contract repository using an existing database handle wrapper. | |
| ~SqliteContractRepository () override | |
| Destroy the repository. | |
| void | addContract (const std::shared_ptr< core::domain::Contract > &contract) override |
| Insert a new contract. | |
| std::vector< std::shared_ptr< core::domain::Contract > > | getContracts () const override |
| Retrieve all contracts. | |
| std::optional< std::shared_ptr< core::domain::Contract > > | getContractById (const std::string &id) const override |
| Retrieve a contract by identifier. | |
| void | removeContract (const std::string &id) override |
| Remove a contract by identifier. | |
| void | updateContract (const std::shared_ptr< core::domain::Contract > &contract) override |
| Update an existing contract. | |
| void | upsertContract (const std::shared_ptr< core::domain::Contract > &contract) override |
| Insert or update a contract. | |
| void | clearContracts () override |
| Remove all contracts. | |
| std::vector< std::shared_ptr< core::domain::Contract > > | getContractsForActor (const std::string &actorId) const override |
| Retrieve contracts associated with a given actor. | |
| std::vector< std::shared_ptr< core::domain::Contract > > | getContractsForProperty (const std::string &propertyId) const override |
| Retrieve contracts associated with a given property. | |
| std::vector< std::string > | getActorIdsForContract (const std::string &contractId) const override |
| Retrieve actor identifiers linked to a contract. | |
| std::vector< std::string > | getPropertyIdsForContract (const std::string &contractId) const override |
| Retrieve property identifiers linked to a contract. | |
| Public Member Functions inherited from core::ports::repositories::IContractRepository | |
| virtual | ~IContractRepository ()=default |
| Destroy the contract repository interface. | |
Definition at line 14 of file SqliteContractRepository.h.
|
explicit |
Create a contract repository for the database at the given path.
| dbPath | SQLite database path. |
Definition at line 21 of file SqliteContractRepository.cpp.


|
explicit |
Create a contract repository using an existing database handle wrapper.
| db | Shared SQLite database wrapper. |
Definition at line 24 of file SqliteContractRepository.cpp.
|
overridedefault |
Destroy the repository.
|
overridevirtual |
Insert a new contract.
| contract | Contract to add. |
Implements core::ports::repositories::IContractRepository.
Definition at line 244 of file SqliteContractRepository.cpp.


|
overridevirtual |
Remove all contracts.
Implements core::ports::repositories::IContractRepository.
Definition at line 350 of file SqliteContractRepository.cpp.
|
overridevirtual |
Retrieve actor identifiers linked to a contract.
| contractId | Contract identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 396 of file SqliteContractRepository.cpp.

|
overridevirtual |
Retrieve a contract by identifier.
| id | Contract identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 287 of file SqliteContractRepository.cpp.


|
overridevirtual |
Retrieve all contracts.
Implements core::ports::repositories::IContractRepository.
Definition at line 267 of file SqliteContractRepository.cpp.

|
overridevirtual |
Retrieve contracts associated with a given actor.
| actorId | Actor identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 361 of file SqliteContractRepository.cpp.

|
overridevirtual |
Retrieve contracts associated with a given property.
| propertyId | Property identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 379 of file SqliteContractRepository.cpp.

|
overridevirtual |
Retrieve property identifiers linked to a contract.
| contractId | Contract identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 410 of file SqliteContractRepository.cpp.

|
overridevirtual |
Remove a contract by identifier.
| id | Contract identifier. |
Implements core::ports::repositories::IContractRepository.
Definition at line 305 of file SqliteContractRepository.cpp.

|
overridevirtual |
Update an existing contract.
| contract | Contract to update. |
Implements core::ports::repositories::IContractRepository.
Definition at line 315 of file SqliteContractRepository.cpp.


|
overridevirtual |
Insert or update a contract.
| contract | Contract to upsert. |
Implements core::ports::repositories::IContractRepository.
Definition at line 341 of file SqliteContractRepository.cpp.
