Bio::EnsEMBL::ExternalData::CDSTrack::DBSQL CcdsAdaptor
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::DBSQL::BaseAdaptor
Bio::EnsEMBL::ExternalData::CDSTrack::Ccds
Bio::EnsEMBL::ExternalData::CDSTrack::DBSQL::DBAdaptor
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( deprecate throw warning stack_trace_dump )
Inherit
Bio::EnsEMBL::DBSQL::BaseAdaptor
Synopsis
No synopsis!
Description
No description!
Methods
_columns
No description
Code
_objs_from_sth
No description
Code
_tables
No description
Code
fetch_by_GroupVersion
No description
Code
fetch_by_dbID
No description
Code
fetch_by_group_version_id
No description
Code
Methods description
None available.
Methods code
_columnsdescriptionprevnextTop
sub _columns {
  my $self = shift;
  return ( 'cu.ccds_uid', 'cu.group_uid', 'cu.latest_version' );
}
_objs_from_sthdescriptionprevnextTop
sub _objs_from_sth {
  my ($self, $sth) = @_;
  my @out;
  my ($ccds_id, $group_id, $latest_version); 
  
  $sth->bind_columns(\$ ccds_id,\$ group_id,\$ latest_version); 


  while($sth->fetch()) {
    
    push @out, Bio::EnsEMBL::ExternalData::CDSTrack::Ccds->new(
              -dbID            => $ccds_id,
              -group_id        => $group_id,
              -latest_version  => $latest_version,
              -adaptor         => $self 
    );
  
    
  }
  return\@ out;
}

1;
}
_tablesdescriptionprevnextTop
sub _tables {
  my $self = shift;
  return (['CcdsUids' , 'cu']);
}
fetch_by_GroupVersiondescriptionprevnextTop
sub fetch_by_GroupVersion {
  my $self = shift;
  my $gv = shift;
  
  if (!ref $gv || !$gv->isa('Bio::EnsEMBL::ExternalData::CDSTrack::GroupVersion') ) {
    throw("Must provide a Bio::EnsEMBL::ExternalData::CDSTrack::GroupVersion object");
  }
  
  my $gv_id = $gv->dbID;

  my ($ccds_obj) = $self->fetch_by_group_version_id($gv_id);
  return $ccds_obj;
}
fetch_by_dbIDdescriptionprevnextTop
sub fetch_by_dbID {
  my $self = shift;
  my $ccds_id = shift;
  
  throw("Require dbID for fetch_by_dbID")
         unless ($ccds_id);
  
  my $constraint = "cu.ccds_uid = '$ccds_id'";
  my ($ccds_obj) = @{ $self->generic_fetch($constraint) };
  
  return $ccds_obj;
}
fetch_by_group_version_iddescriptionprevnextTop
sub fetch_by_group_version_id {
  my $self = shift;
  my $gv_id = shift;
  
  throw("Require group_version_id for fetch_by_group_version_id")
         unless ($gv_id);
  
  my $sql = "SELECT cu.ccds_uid ".
            "FROM CcdsUids cu, GroupVersions gv ".
            "WHERE cu.group_uid = gv.group_uid ".
            "AND gv.group_version_uid = '$gv_id'";
            
  
  my $sth = $self->prepare($sql);
  
  $sth->execute();
  my ($id) = $sth->fetchrow();
  my $ccds_obj;
  if (defined $id){
    $ccds_obj = $self->fetch_by_dbID($id);
  }
  
  return $ccds_obj;
}
General documentation
No general documentation available.