#!/usr/bin/perl
package Phrase_category;

#####################################################################
# Author : Kane Tse
# Date   : July 2001
#####################################################################

use strict;
use DBI;
use Carp;
use vars qw (@ISA %allowedConstructors);
use dictyBase_Table;
use Code;
@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 = ('phrase_no:phrase_category'=>undef);


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

}

####################################################################
sub getPhraseCategoryList {
####################################################################
    my ($class) = @_;

    my $schema = $class->schema();
    my $sql = ("SELECT code_value ".
	       "FROM   $schema ".
	       "WHERE  tab_name = 'PHRASE_CATEGORY' ");
    my $sth = $class->dbh->prepare($sql);
    $sth->execute();
    my $arrayRef = $sth->fetchall_arrayref();
    return $arrayRef;
}

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

=pod

=head1 Name

Phrase_category.pm

=head1 Description

This perl object (Phrase_categoryk.pm) acts as container for Phrase_category info in the Oracle database. Once an object has been instantiated, several methods are available to retrieve the attributes of the object. 


=head1 Instantiating a New Phrase_category Object

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

my $PhraseCategoryObj = Phrase_category->new(dbh=>$dbh,
		                     phrase_category_no=>$PhraseLinkNo);

where $dbh is a valid database handle to either dictyBase or SDEV. All passed in values must be valid values for the columns that were provided, otherwise the script will die, with an appropriate error message.
 

=head1 Accessor Methods


All accessor methods take the form of : 


column_name, eg: 


my $dateCreated = $Obj->date_created; 


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

=head1 Author

Shuai Weng

shuai@genome.stanford.edu

Kane Tse

ktse@genome.stanford.edu
=cut











