30 virtual void addContract(
const std::shared_ptr<core::domain::Contract>& contract) = 0;
36 virtual std::vector<std::shared_ptr<core::domain::Contract>>
getContracts()
const = 0;
43 virtual std::optional<std::shared_ptr<core::domain::Contract>>
getContractById(
const std::string&
id)
const = 0;
55 virtual void updateContract(
const std::shared_ptr<core::domain::Contract>& contract) = 0;
61 virtual void upsertContract(
const std::shared_ptr<core::domain::Contract>& contract) = 0;
73 virtual std::vector<std::shared_ptr<core::domain::Contract>>
getContractsForActor(
const std::string& actorId)
const = 0;
80 virtual std::vector<std::shared_ptr<core::domain::Contract>>
getContractsForProperty(
const std::string& propertyId)
const = 0;
virtual std::vector< std::string > getPropertyIdsForContract(const std::string &contractId) const =0
Retrieve property identifiers linked to a contract.
virtual void upsertContract(const std::shared_ptr< core::domain::Contract > &contract)=0
Insert or update a contract.
virtual std::vector< std::shared_ptr< core::domain::Contract > > getContractsForActor(const std::string &actorId) const =0
Retrieve contracts associated with a given actor.
virtual std::vector< std::shared_ptr< core::domain::Contract > > getContracts() const =0
Retrieve all contracts.
virtual std::vector< std::string > getActorIdsForContract(const std::string &contractId) const =0
Retrieve actor identifiers linked to a contract.
virtual std::optional< std::shared_ptr< core::domain::Contract > > getContractById(const std::string &id) const =0
Retrieve a contract by identifier.
virtual void removeContract(const std::string &id)=0
Remove a contract by identifier.
virtual void clearContracts()=0
Remove all contracts.
virtual ~IContractRepository()=default
Destroy the contract repository interface.
virtual void updateContract(const std::shared_ptr< core::domain::Contract > &contract)=0
Update an existing contract.
virtual void addContract(const std::shared_ptr< core::domain::Contract > &contract)=0
Add a new contract.
virtual std::vector< std::shared_ptr< core::domain::Contract > > getContractsForProperty(const std::string &propertyId) const =0
Retrieve contracts associated with a given property.