class Patriarch::DAOServices::RetrieverService

Services managing transactions must not know how the database layer is structured. We thus provide DAO through this RetrieverService and let them know about the interface of the DAOs

Public Instance Methods

call(transaction_item) click to toggle source

@return [Hash] hash containing DAOs for RelationshipBuilderServices to toy with @param [Patriarch::Transaction] transaction_item Only public method of this service, does the work of retrieving DAOs for a given transaction step

# File lib/patriarch/dao_services/retriever_service.rb, line 13
def call(transaction_item)
  result = {}
  result[:actor]  = instantiate_DAO_for_actor(transaction_item)
  result[:target] = instantiate_DAO_for_target(transaction_item)
  if transaction_item.tripartite?
    result[:medium] = instantiate_DAO_for_medium(transaction_item)
  end
  result
end