buzgilla -> redmine
[bioperl-db.git] / lib / Bio / DB / Persistent / ObjectRelMapperI.pm
blob579f906f179412b513ddc0ebdc8b6a3ed854f798
1 # $Id$
3 # BioPerl module for Bio::DB::Persistent::ObjectRelMapperI
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Hilmar Lapp <hlapp at gmx.net>
9 # Copyright Hilmar Lapp
11 # You may distribute this module under the same terms as perl itself
14 # (c) Hilmar Lapp, hlapp at gmx.net, 2002.
15 # (c) GNF, Genomics Institute of the Novartis Research Foundation, 2002.
17 # You may distribute this module under the same terms as perl itself.
18 # Refer to the Perl Artistic License (see the license accompanying this
19 # software package, or see http://www.perl.com/language/misc/Artistic.html)
20 # for the terms under which you may use, modify, and redistribute this module.
22 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
23 # WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
24 # MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27 # POD documentation - main docs before the code
29 =head1 NAME
31 Bio::DB::Persistent::ObjectRelMapperI - DESCRIPTION of Interface
33 =head1 SYNOPSIS
35 Give standard usage here
37 =head1 DESCRIPTION
39 Describe the interface here
41 =head1 FEEDBACK
43 =head2 Mailing Lists
45 User feedback is an integral part of the evolution of this and other
46 Bioperl modules. Send your comments and suggestions preferably to
47 the Bioperl mailing list. Your participation is much appreciated.
49 bioperl-l@bioperl.org - General discussion
50 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52 =head2 Support
54 Please direct usage questions or support issues to the mailing list:
56 I<bioperl-l@bioperl.org>
58 rather than to the module maintainer directly. Many experienced and
59 reponsive experts will be able look at the problem and quickly
60 address it. Please include a thorough description of the problem
61 with code and data examples if at all possible.
63 =head2 Reporting Bugs
65 Report bugs to the Bioperl bug tracking system to help us keep track
66 of the bugs and their resolution. Bug reports can be submitted via
67 the web:
69 http://redmine.open-bio.org/projects/bioperl/
71 =head1 AUTHOR - Hilmar Lapp
73 Email hlapp at gmx.net
75 Describe contact details here
77 =head1 CONTRIBUTORS
79 Additional contributors names and emails here
81 =head1 APPENDIX
83 The rest of the documentation details each of the object methods.
84 Internal methods are usually preceded with a _
86 =cut
89 # Let the code begin...
92 package Bio::DB::Persistent::ObjectRellMapperI;
93 use vars qw(@ISA);
94 use strict;
95 use Carp;
96 use Bio::Root::RootI;
98 @ISA = qw( Bio::Root::RootI );
101 =head2 table_name
103 Title : table_name
104 Usage :
105 Function: Obtain the name of the table in the relational schema corresponding
106 to the given class name, object, or persistence adaptor.
108 Example :
109 Returns : the name of the table (a string), or undef if the table cannot be
110 determined
111 Args : The referenced object, class name, or the persistence adaptor for
112 it.
115 =cut
117 sub table_name{
118 shift->throw_not_implemented();
121 =head2 association_table_name
123 Title : association_table_name
124 Usage :
125 Function: Obtain the name of the table in the relational schema corresponding
126 to the association of entities as represented by their
127 corresponding class names, objects, or persistence adaptors.
129 Example :
130 Returns : the name of the table (a string)
131 Args : A reference to an array of objects, class names, or persistence
132 adaptors. The array may freely mix types.
135 =cut
137 sub association_table_name{
138 shift->throw_not_implemented();
141 =head2 primary_key_name
143 Title : primary_key_name
144 Usage :
145 Function: Obtain the name of the primary key attribute for the given table in
146 the relational schema.
148 Example :
149 Returns : The name of the primary key (a string)
150 Args : The name of the table (a string)
153 =cut
155 sub primary_key_name{
156 shift->throw_not_implemented();
159 =head2 foreign_key_name
161 Title : foreign_key_name
162 Usage :
163 Function: Obtain the foreign key name for referencing an object, as
164 represented by object, class name, or the persistence adaptor.
165 Example :
166 Returns : the name of the foreign key (a string)
167 Args : The referenced object, class name, or the persistence adaptor for
168 it.
171 =cut
173 sub foreign_key_name{
174 shift->throw_not_implemented();
177 =head2 slot_attribute_map
179 Title : slot_attribute_map
180 Usage :
181 Function: Get/set the mapping for each entity from object slot names to column
182 names.
183 Example :
184 Returns : A reference to a hash map with entity names being the keys, if no
185 key (entity name, object, or adaptor) was provided. Otherwise,
186 a hash reference with the slot names being keys to their
187 corresponding column names.
188 Args : Optionally, the object, adaptor, or entity for which to obtain
189 the map.
190 Optionally, on set a reference to a hash map satisfying the features
191 of the returned value.
194 =cut
196 sub slot_attribute_map{
197 shift->throw_not_implemented();