lintel 0.2.0
Loading...
Searching...
No Matches
GroupRepository.h
Go to the documentation of this file.
1#ifndef LINTEL_GROUPREPOSITORY_H
2#define LINTEL_GROUPREPOSITORY_H
3
4#include <memory>
5#include <optional>
6
11
12namespace lintel {
18{
19private:
20 // Variables:
21 // injections
22 std::shared_ptr<DatabaseConnectionConfigurations> m_connectionConfigurations;
23 std::shared_ptr<DatabaseConnectionEntry> m_connectionEntry;
24 // cache of groups
25 std::vector<Group> m_groups;
26 std::map<std::string, Group> m_groupMap;
27
29 void initGroups();
30
31public:
36 explicit GroupRepository(std::shared_ptr<DatabaseConnectionConfigurations> connectionConfigurations);
37
38 virtual ~GroupRepository() = default;
39
45 std::optional<Group> of(const std::string &groupName);
46
48 std::vector<Group> allOf();
49
54 std::vector<Group> allOf(const std::string &groupName);
55
60 std::vector<Group> allOf(bool isVirtualGroup);
61
67 std::vector<Group> allOf(const std::string &groupName, bool isVirtualGroup);
68
73 void createOf(const Group &group);
74
79 void deleteOf(const Group &group);
80
86 void addGroupOf(const Group &group, const Group &add);
87
93 void removeGroupOf(const Group &group, const Group &remove);
94
96 void onAwake() override;
97};
98
99}// namespace lintel
100#endif// LINTEL_GROUPREPOSITORY_H
Definition GroupRepository.h:18
void removeGroupOf(const Group &group, const Group &remove)
std::vector< Group > allOf()
std::vector< Group > allOf(bool isVirtualGroup)
virtual ~GroupRepository()=default
std::vector< Group > allOf(const std::string &groupName, bool isVirtualGroup)
GroupRepository(std::shared_ptr< DatabaseConnectionConfigurations > connectionConfigurations)
void deleteOf(const Group &group)
std::vector< Group > allOf(const std::string &groupName)
std::optional< Group > of(const std::string &groupName)
void createOf(const Group &group)
void addGroupOf(const Group &group, const Group &add)
void onAwake() override
Definition Group.h:35
Definition PersistableBean.h:7
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9