lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::DatabasePropertyRepository Class Reference

#include <DatabasePropertyRepository.h>

Inheritance diagram for lintel::DatabasePropertyRepository:
lintel::PropertyRepository

Public Member Functions

 DatabasePropertyRepository (std::shared_ptr< DatabaseConnectionConfigurations > connectionConfigurations, const std::shared_ptr< Configuration > &configuration, std::shared_ptr< ProcessName > processName)
 
DataStorage getDataStorage () override
 
void save (const std::vector< std::shared_ptr< PropertyBase > > &properties) override
 
void save (std::shared_ptr< PropertyBase > property) override
 
void deleteOf (const std::vector< std::shared_ptr< PropertyBase > > &properties) override
 
std::vector< std::shared_ptr< PropertyBase > > awake () override
 
std::vector< std::shared_ptr< PropertyBase > > allOf (const std::string &processName=".*", const std::string &className=".*", const std::string &instanceName=".*", const std::string &name=".*") override
 
- Public Member Functions inherited from lintel::PropertyRepository
 PropertyRepository (PropertyRepositoryType type, const std::shared_ptr< Configuration > &configuration)
 
virtual ~PropertyRepository ()=default
 
PropertyRepositoryType getType () const
 
bool isShadow () const
 
bool isEnabled () const
 
bool isMutable () const
 

Detailed Description

Property repository that persists properties to a database

Constructor & Destructor Documentation

◆ DatabasePropertyRepository()

lintel::DatabasePropertyRepository::DatabasePropertyRepository ( std::shared_ptr< DatabaseConnectionConfigurations >  connectionConfigurations,
const std::shared_ptr< Configuration > &  configuration,
std::shared_ptr< ProcessName >  processName 
)

Member Function Documentation

◆ allOf()

std::vector< std::shared_ptr< PropertyBase > > lintel::DatabasePropertyRepository::allOf ( const std::string &  processName = ".*",
const std::string &  className = ".*",
const std::string &  instanceName = ".*",
const std::string &  name = ".*" 
)
overridevirtual

Query properties with optional filters

Returns an empty vector by default: an implementation without query support reports "no overrides", which PropertyService reads as "keep the configured default". The default is only reached for FilePropertyRepository, whose values come from the XML configuration and are never queried at runtime.

Parameters
processNameregex for process name
classNameregex for class name
instanceNameregex for instance name
nameregex for property name

Reimplemented from lintel::PropertyRepository.

◆ awake()

std::vector< std::shared_ptr< PropertyBase > > lintel::DatabasePropertyRepository::awake ( )
overridevirtual

load all properties from repository and return result

Implements lintel::PropertyRepository.

◆ deleteOf()

void lintel::DatabasePropertyRepository::deleteOf ( const std::vector< std::shared_ptr< PropertyBase > > &  properties)
overridevirtual

deletes properties in the mentioned repository

No-op by default: a read-only repository has nothing to delete from. PropertyService only reaches this method behind an isMutable() check, so the default is unreachable for FilePropertyRepository, which PropertyRepositoryComponent::parse rejects with a ConfigurationException when mutable="true" is configured.

Reimplemented from lintel::PropertyRepository.

◆ getDataStorage()

DataStorage lintel::DatabasePropertyRepository::getDataStorage ( )
overridevirtual
Returns
data storage info

Implements lintel::PropertyRepository.

◆ save() [1/2]

void lintel::DatabasePropertyRepository::save ( const std::vector< std::shared_ptr< PropertyBase > > &  properties)
overridevirtual

save properties to repository

Implements lintel::PropertyRepository.

◆ save() [2/2]

void lintel::DatabasePropertyRepository::save ( std::shared_ptr< PropertyBase >  property)
overridevirtual

save property to repository

Implements lintel::PropertyRepository.


The documentation for this class was generated from the following file: