#!/usr/bin/perl
package Update_log;

#####################################################################
# Author : Shuai Weng
# Date   : July 2001
# 
# See documentation for the usage details. 
#    
# http:///usr/local/dicty/www_dictybase/db/lib/html/dictyBase/programmer/Update_log.html
#
#####################################################################

use strict;
use DBI;
use Carp;
use vars qw (@ISA %allowedConstructors);
use dictyBase_Table;
@ISA = qw (dictyBase_Table); # base class

# Class Globals

# put column names in the hash below, that are able to uniquely
# specify a row in the table

%allowedConstructors = (ulog_no=>undef,
       'tab_name:col_name:primary_key:old_value:new_value'=>undef);



####################################################################
sub DESTROY{
####################################################################
# nothing needs to be done 

}


####################################################################
1; #################################################################
####################################################################

=pod

=head1 Name

Update_log.pm

=head1 Description

This perl object (Update_log.pm) acts as container for a specified row in Update_log table. Once an object has been instantiated, several methods are available to retrieve the attributes of the object.  


=head1 Instantiating a New Update_log Object

To instantiate a new Update_log object, you may use one of following syntaxes: 

my $ulogObj = Update_log->new(dbh=>$dbh, ulog_no=>$ulogNo); 


or $ulogObj = Update_log->new(dbh=>$dbh, 
			      tab_name=>$tabNm,
			      col_name=>$colNm,
			      primary_key=>$prikey,
			      old_value=>$oldVal,
			      new_value=>$newVal);


where $dbh is a valid database handle to either dictyBase or SDEV. $value must be a valid value for the column that was provided, otherwise the script will die, with an appropriate error message.
 


=head1 Accessor Methods


All accessor methods take the form of : 


my $column_value = $ulogObj->column_name, eg: 


my $tab_name = $ulogObj->tab_name; 


etc. You can use an accessor for any valid column in the Update_log table. 


See valid columns in abstact table:

http:///usr/local/dicty/www_dictybase/db/lib/cgi-bin/dictyBase/tableSpecifications?table=UPDATE_LOG


=head2 getRow

Usage:

my $row = $ulogObj->getRow;

This method returns a tab-delimited row from update_log table.

=head1 Insert, update and delete Methods

You can also use 'Insert' class method and 'update' and 'delete' 
instance methods for inserting new row into database, updating and 
deleting info for a specified row. 

See dictyBase_Table documentation for usage details :

Update : http:///usr/local/dicty/www_dictybase/db/lib/staff/dictyBase/programmer/dictyBase_Table.html#Update_Method

Insert : http:///usr/local/dicty/www_dictybase/db/lib/staff/dictyBase/programmer/dictyBase_Table.html#Insert_Method

Delete : http:///usr/local/dicty/www_dictybase/db/lib/staff/dictyBase/programmer/dictyBase_Table.html#Delete_Method

=head1 Author

Shuai Weng

shuai@genome.stanford.edu

=cut











