From f72c0cb8f1d3fe41a5c396954a3e2f24855a110f Mon Sep 17 00:00:00 2001
From: Leo Gordon <lg4@ebi.ac.uk>
Date: Mon, 11 Apr 2011 16:18:06 +0000
Subject: [PATCH] renamed fetch_from_analysis_id_branch_code method into
 fetch_all_by_from_analysis_id_and_branch_code

---
 modules/Bio/EnsEMBL/Hive/AnalysisJob.pm               | 2 +-
 modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm  | 2 +-
 modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/Bio/EnsEMBL/Hive/AnalysisJob.pm b/modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
index 5a96a08d5..265e9df33 100755
--- a/modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
+++ b/modules/Bio/EnsEMBL/Hive/AnalysisJob.pm
@@ -249,7 +249,7 @@ sub dataflow_output_id {
     $self->autoflow(0) if($dataflow_rule_adaptor->branch_name_2_code($branch_name_or_code)==1);
 
     my @output_job_ids = ();
-    my $rules       = $dataflow_rule_adaptor->fetch_from_analysis_id_branch_code($self->analysis_id, $branch_name_or_code);
+    my $rules       = $dataflow_rule_adaptor->fetch_all_by_from_analysis_id_and_branch_code($self->analysis_id, $branch_name_or_code);
     foreach my $rule (@$rules) {
 
         my $output_ids_for_this_rule;
diff --git a/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm b/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
index a6b82ced9..32400df87 100644
--- a/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
+++ b/modules/Bio/EnsEMBL/Hive/DBSQL/AnalysisJobAdaptor.pm
@@ -623,7 +623,7 @@ sub release_and_age_job {
 sub gc_dataflow {
     my ($self, $analysis_id, $job_id, $branch_name) = @_;
 
-    unless(@{ $self->db->get_DataflowRuleAdaptor->fetch_from_analysis_id_branch_code($analysis_id, $branch_name) }) {
+    unless(@{ $self->db->get_DataflowRuleAdaptor->fetch_all_by_from_analysis_id_and_branch_code($analysis_id, $branch_name) }) {
         return 0;   # no corresponding gc_dataflow rule has been defined
     }
 
diff --git a/modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm b/modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
index fa4860382..9723c2958 100755
--- a/modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
+++ b/modules/Bio/EnsEMBL/Hive/DBSQL/DataflowRuleAdaptor.pm
@@ -69,10 +69,10 @@ sub branch_name_2_code {
     return defined($branch_code) ? $branch_code : die "Could not map the branch_name '$branch_name_or_code' to the internal code";
 }
 
-=head2 fetch_from_analysis_id_branch_code
+=head2 fetch_all_by_from_analysis_id_and_branch_code
 
   Args       : unsigned int $analysis_id, unsigned int $branch_code
-  Example    : my @rules = @{$ruleAdaptor->fetch_from_analysis_id_branch_code($analysis_id, $branch_code)};
+  Example    : my @rules = @{$ruleAdaptor->fetch_all_by_from_analysis_id_and_branch_code($analysis_id, $branch_code)};
   Description: searches database for rules with given from_analysis_id and branch_code
                and returns all such rules in a list (by reference)
   Returntype : reference to list of Bio::EnsEMBL::Hive::DataflowRule objects
@@ -81,7 +81,7 @@ sub branch_name_2_code {
 
 =cut
 
-sub fetch_from_analysis_id_branch_code {
+sub fetch_all_by_from_analysis_id_and_branch_code {
     my ($self, $analysis_id, $branch_name_or_code) = @_;
 
     return [] unless($analysis_id);
-- 
GitLab