FOSSredder 0.5.0
Loading...
Searching...
No Matches
IPropertyRepository.h
Go to the documentation of this file.
1
5
6#pragma once
7
8#include <memory>
9#include <optional>
10#include <string>
11#include <vector>
12
13namespace core::domain {
14class Property;
15}
16
18
20public:
24 virtual ~IPropertyRepository() = default;
25
30 virtual void addProperty(const std::shared_ptr<core::domain::Property>& property) = 0;
31
36 virtual std::vector<std::shared_ptr<core::domain::Property>> getProperties() const = 0;
37
43 virtual std::optional<std::shared_ptr<core::domain::Property>> getPropertyById(const std::string& id) const = 0;
44
49 virtual void removeProperty(const std::string& id) = 0;
50
55 virtual void updateProperty(const std::shared_ptr<core::domain::Property>& property) = 0;
56
61 virtual void upsertProperty(const std::shared_ptr<core::domain::Property>& property) = 0;
62
66 virtual void clearProperties() = 0;
67};
68
69} // namespace core::ports::repositories
virtual void addProperty(const std::shared_ptr< core::domain::Property > &property)=0
Add a new property.
virtual void updateProperty(const std::shared_ptr< core::domain::Property > &property)=0
Update an existing property.
virtual void upsertProperty(const std::shared_ptr< core::domain::Property > &property)=0
Insert or update a property.
virtual void clearProperties()=0
Remove all properties.
virtual std::optional< std::shared_ptr< core::domain::Property > > getPropertyById(const std::string &id) const =0
Retrieve a property by identifier.
virtual ~IPropertyRepository()=default
Destroy the property repository interface.
virtual std::vector< std::shared_ptr< core::domain::Property > > getProperties() const =0
Retrieve all properties.
virtual void removeProperty(const std::string &id)=0
Remove a property by identifier.