Class: CaTissue::Annotation::IntegrationService
- Inherits:
-
CaRuby::PersistenceService
- Object
- CaRuby::PersistenceService
- CaTissue::Annotation::IntegrationService
- Defined in:
- lib/catissue/database/annotation/integration_service.rb
Overview
An IntegrationService fetches and saves CaTissue hook-annotation associations.
Constant Summary collapse
- SERVICE_NAME =
'deintegration'
Instance Method Summary collapse
-
#associate(hook, annotation) ⇒ Object
Associates the given hook domain object to the annotation.
-
#initialize ⇒ IntegrationService
constructor
A new instance of IntegrationService.
Constructor Details
#initialize ⇒ IntegrationService
Returns a new instance of IntegrationService.
16 17 18 19 20 |
# File 'lib/catissue/database/annotation/integration_service.rb', line 16 def initialize super(SERVICE_NAME) # SQL executor to handle caTissue DE API bug work-around @executor = CaRuby::SQLExecutor.new(CaTissue.access_properties) end |
Instance Method Details
#associate(hook, annotation) ⇒ Object
Associates the given hook domain object to the annotation.
26 27 28 29 30 |
# File 'lib/catissue/database/annotation/integration_service.rb', line 26 def associate(hook, annotation) logger.debug { "Associating annotation #{annotation} to owner #{hook}..." } emr = create_entity_map_record(hook, annotation) create(emr) end |