Leosac
0.8.0
Open Source Access Control
|
Provides various database-related services to consumer. More...
#include <DBService.hpp>
Public Types | |
enum | Flag { DEFAULT = 0, THROW_IF_NOT_FOUND = 1 } |
Private Attributes | |
const DBPtr | database_ |
Provides various database-related services to consumer.
Definition at line 34 of file DBService.hpp.
Enumerator | |
---|---|
DEFAULT | |
THROW_IF_NOT_FOUND |
Definition at line 37 of file DBService.hpp.
DBService::DBService | ( | DBPtr | db | ) |
Definition at line 40 of file DBService.cpp.
DBPtr DBService::db | ( | ) | const |
Simply returns the underlying database pointer.
Definition at line 46 of file DBService.cpp.
Auth::IAccessPointPtr DBService::find_access_point_by_id | ( | const Auth::AccessPointId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 151 of file DBService.cpp.
Audit::IAuditEntryPtr DBService::find_audit_by_id | ( | const Audit::AuditEntryId & | id, |
Flag | f = Flag::DEFAULT |
||
) |
Definition at line 137 of file DBService.cpp.
Cred::ICredentialPtr DBService::find_credential_by_id | ( | const Cred::CredentialId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 92 of file DBService.cpp.
Auth::IDoorPtr DBService::find_door_by_id | ( | const Auth::DoorId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 114 of file DBService.cpp.
Auth::GroupPtr DBService::find_group_by_id | ( | const Auth::GroupId & | id, |
Flag | f = Flag::DEFAULT |
||
) |
Retrieve a group by its id.
Definition at line 61 of file DBService.cpp.
Auth::UserGroupMembershipPtr DBService::find_membership_by_id | ( | const Auth::UserGroupMembershipId & | id, |
Flag | f = Flag::DEFAULT |
||
) |
Definition at line 82 of file DBService.cpp.
Tools::ISchedulePtr DBService::find_schedule_by_id | ( | const Tools::ScheduleId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 103 of file DBService.cpp.
update::IUpdatePtr DBService::find_update_by_id | ( | const update::UpdateId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 162 of file DBService.cpp.
Auth::UserPtr DBService::find_user_by_id | ( | const Auth::UserId & | id, |
Flag | f = Flag::DEFAULT |
||
) |
Find a user by its id.
Definition at line 71 of file DBService.cpp.
Auth::IZonePtr DBService::find_zone_by_id | ( | const Auth::ZoneId & | id, |
DBService::Flag | flags = Flag::DEFAULT |
||
) |
Definition at line 125 of file DBService.cpp.
size_t DBService::operation_count | ( | ) | const |
Return the number of operation against the database.
Definition at line 51 of file DBService.cpp.
void DBService::persist | ( | Audit::IAuditEntry & | ientry | ) |
Persist an audit entry object.
Begin and commit a new transaction if there is currently no transaction in progress. Otherwise, simple persist the object in the current transaction, but does not call commit().
Definition at line 190 of file DBService.cpp.
void DBService::update | ( | Audit::IAuditEntry & | ientry | ) |
Update the object.
Definition at line 195 of file DBService.cpp.
|
private |
Definition at line 106 of file DBService.hpp.