# -------------------------------------------------------------------------------------
# flo::Record::Contributor
# -------------------------------------------------------------------------------------
#
#       Author : Jean-Michel Hiver (jhiver@cisedi.com).
#    Copyright : (c) MKDoc Holdings Ltd, 2000.
# 
#      Unauthorized modification, use, reuse, distribution or redistribution
#      of this module is stricly forbidden.
#
#    Description:
#
#      Every record from the 'Contributor' table will be blessed into this class
#      so that we can add extra method to access to in the template engine.
#
# -------------------------------------------------------------------------------------
package flo::Record::Contributor;
use flo::Standard;
use strict;


##
# $self->Editor_ID;
# -----------------
#   Accessor for Editor_ID
##
sub Editor_ID
{
    my $self = shift;
    $self->{Editor_ID} = shift || return $self->{Editor_ID};
}


##
# $self->Editor;
# --------------
#   Returns the Editor object which is related to that Contributor record
##
sub Editor
{
    my $self = shift;
    my $editor_table = table 'Editor';
    return $editor_table->get ($self->Editor_ID);
}


##
# $self->Document_ID;
# -------------------
#   Accessor for Document_ID
##
sub Document_ID
{
    my $self = shift;
    $self->{Document_ID} = shift || return $self->{Document_ID};
}


##
# $self->Document;
# ----------------
#   Returns the Document object which is related to that Contributor record
##
sub Document
{
    my $self = shift;
    my $editor_table = table 'Document';
    return $editor_table->get ($self->Document_ID);
}


1;


