From a11723c9d0dcf9fe653bb2fb9359f979216a5135 Mon Sep 17 00:00:00 2001
From: Glenn Proctor <gp1@sanger.ac.uk>
Date: Wed, 16 Jul 2003 12:47:20 +0000
Subject: [PATCH] Added list_dbIDs and list_stable_dbIDs.

---
 modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm      | 32 +++++++++++++++++
 .../Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm   | 34 +++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
index 7eb9e7a37c..ce22bc0817 100644
--- a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm
@@ -569,6 +569,38 @@ sub remove {
   $exon->{dbID} = undef;
 }
 
+=head2 list_dbIDs
 
+  Arg [1]    : none
+  Example    : @g_ids = $exon_adaptor->list_dbIDs();
+  Description: Gets an array of internal ids for all exons in the current db
+  Returntype : list of ints
+  Exceptions : none
+  Caller     : ?
+
+=cut
+
+sub list_dbIDs {
+   my ($self) = @_;
+
+   return $self->_list_dbIDs("exon");
+}
+
+=head2 list_stable_dbIDs
+
+  Arg [1]    : none
+  Example    : @stable_exon_ids = $exon_adaptor->list_stable_dbIDs();
+  Description: Gets an array of stable ids for all exons in the current db
+  Returntype : list of ints
+  Exceptions : none
+  Caller     : ?
+
+=cut
+
+sub list_stable_dbIDs {
+   my ($self) = @_;
+
+   return $self->_list_dbIDs("exon_stable_id", "stable_id");
+}
 
 1;
diff --git a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm
index 1853c67c89..bb3b0bd2d2 100644
--- a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm
@@ -251,4 +251,38 @@ sub remove {
   $translation->dbID( undef ); #don't think this line works
 }
 
+=head2 list_dbIDs
+
+  Arg [1]    : none
+  Example    : @g_ids = $translation_adaptor->list_dbIDs();
+  Description: Gets an array of internal ids for all translations in the current db
+  Returntype : list of ints
+  Exceptions : none
+  Caller     : ?
+
+=cut
+
+sub list_dbIDs {
+   my ($self) = @_;
+
+   return $self->_list_dbIDs("translation");
+}
+
+=head2 list_stable_dbIDs
+
+  Arg [1]    : none
+  Example    : @stable_translation_ids = $translation_adaptor->list_stable_dbIDs();
+  Description: Gets an array of stable ids for all translations in the current db
+  Returntype : list of ints
+  Exceptions : none
+  Caller     : ?
+
+=cut
+
+sub list_stable_dbIDs {
+   my ($self) = @_;
+
+   return $self->_list_dbIDs("translation_stable_id", "stable_id");
+}
+
 1;
-- 
GitLab