Class: CaTissue::Annotation::IntegrationService

Inherits:
CaRuby::PersistenceService
  • Object
show all
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

Constructor Details

#initializeIntegrationService

Returns a new instance of IntegrationService.

Parameters:



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.

Parameters:



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