CrudService¶
CRUD Service class for supporting CRUD operations on entities.
CrudService
()¶
- bool
create
(path::ServiceProvider &provider, Entity &entity)¶Create the entity.
Parameters:
- provider – An instance of
ServiceProvider
- entity – An instance of
Entity
class defined under a bundleReturns:
true
if successful,false
if notRaises YCPPError: If an error has occurred
- bool
update
(path::ServiceProvider &provider, Entity &entity)¶Update the entity.
Parameters:
- provider – An instance of
ServiceProvider
- entity – An instance of
Entity
class defined under a bundleReturns:
true
if successful,false
if notRaises YCPPError: If an error has occurred
- bool
delete_
(path::ServiceProvider &provider, Entity &entity)¶Delete the entity.
Parameters:
- provider – An instance of
ServiceProvider
- entity – An instance of
Entity
class defined under a bundleReturns:
true
if successful,false
if notRaises YCPPError: If an error has occurred
- std::shared_ptr<ydk::Entity>
read
(path::ServiceProvider &provider, Entity &filter)¶Read the entity.
Parameters:
- provider – An instance of
ServiceProvider
- filter – An instance of
Entity
class defined under a bundleReturns: A pointer to an instance of
Entity
as identified by thefilter
if successful,nullptr
if notRaises YCPPError: If an error has occurred
- std::shared_ptr<ydk::Entity>
read_config
(path::ServiceProvider &provider, Entity &filter)¶Read only config.
Parameters:
- provider – An instance of
ServiceProvider
- filter – An instance of
entity
class defined under a bundleReturns: A pointer to an instance of
Entity
as identified by thefilter
if successful,nullptr
if notRaises YCPPError: If an error has occurred