#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::DistributorContract::RecentlyViewedContractList;

use strict;
use warnings;

use lib '/app/tools/rps/lib';
use RPS::DistributorContract::DistributorContract;

use Common::FormObject;
use RPS::CommandLog;

#use base 'Common::XMLObject';
use base 'RPS::CommandLog';

sub _createLogItemFromDBItem {
    my ( $self, $dbItem ) = @_;

    # First call the inherited method to get the log item
    #
    my $logItem = $self->SUPER::_createLogItemFromDBItem($dbItem);

    my $obj = RPS::DistributorContract::DistributorContract->new( distributorContractID => $logItem->CommandID(), loadSubs => 1 );
    $logItem->{DistributorContract} = $obj;

    return $logItem;
}

sub _init {
    my ( $self, %args ) = @_;

    $args{command}     = 'RPS::DistributorContract::Command::Show';
    $args{most_recent} = 1;

    return $self->SUPER::_init(%args);

}

1;

