| 1 | package AutoSQL::DBObject; | ||
| 2 | use strict; | ||
| 3 | use vars qw(@ISA); | ||
| 4 | use AutoCode::Root; | ||
| 5 | @ISA=qw(AutoCode::Root); | ||
| 6 | use AutoCode::AccessorMaker('$'=>[qw(adaptor)]); | ||
| 7 | |||
| 8 | sub _initialize { | ||
| 9 | my ($self, @args)=@_; | ||
| 10 | $self->SUPER::_initialize(@args); | ||
| 11 | my ($dbid, $adaptor)= | ||
| 12 | $self->_rearrange([qw(DBID ADAPTOR)], @args); | ||
| 13 | |||
| 14 | defined $dbid and $self->dbID($dbid); | ||
| 15 | defined $adaptor and $self->adaptor($adaptor); | ||
| 16 | |||
| 17 | } | ||
| 18 | |||
| 19 | sub dbID { | ||
| 20 | my $self = shift; | ||
| 21 | return $self->{_dbID} = shift if @_; | ||
| 22 | return $self->{_dbID}; | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; |