The watcher.objects.efficacy_indicator Module

class watcher.objects.efficacy_indicator.EfficacyIndicator(context, **kwargs)[source]

Bases: watcher.objects.base.WatcherObject

create(context=None)[source]

Create a EfficacyIndicator record in the DB.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: EfficacyIndicator(context)
destroy(context=None)[source]

Delete the EfficacyIndicator from the DB.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: EfficacyIndicator(context)
classmethod get(context, efficacy_indicator_id)[source]

Find an efficacy indicator object given its ID or UUID

Parameters:efficacy_indicator_id – the ID or UUID of an efficacy indicator.
Returns:a EfficacyIndicator object.
classmethod get_by_id(context, efficacy_indicator_id)[source]

Find an efficacy indicator given its integer ID

Parameters:efficacy_indicator_id – the id of an efficacy indicator.
Returns:a EfficacyIndicator object.
classmethod get_by_uuid(context, uuid)[source]

Find an efficacy indicator given its UUID

Parameters:
  • uuid – the uuid of an efficacy indicator.
  • context – Security context
Returns:

a EfficacyIndicator object.

classmethod list(context, limit=None, marker=None, filters=None, sort_key=None, sort_dir=None)[source]

Return a list of EfficacyIndicator objects.

Parameters:
  • context – Security context.
  • limit – maximum number of resources to return in a single result.
  • marker – pagination marker for large data sets.
  • filters – Filters to apply. Defaults to None.
  • sort_key – column to sort results by.
  • sort_dir – direction to sort. “asc” or “desc”.
Returns:

a list of EfficacyIndicator object.

refresh(context=None)[source]

Loads updates for this EfficacyIndicator.

Loads an efficacy indicator with the same uuid from the database and checks for updated attributes. Updates are applied to the loaded efficacy indicator column by column, if there are any updates.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: EfficacyIndicator(context)
save(context=None)[source]

Save updates to this EfficacyIndicator.

Updates will be made column by column based on the result of self.what_changed().

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: EfficacyIndicator(context)
soft_delete(context=None)[source]

Soft Delete the efficacy indicator from the DB.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Audit(context)

Previous topic

The watcher.objects.base Module

Next topic

The watcher.objects.goal Module

Project Source

This Page