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

use strict;
use warnings;
use Carp;

use Data::Dumper;
use lib '/app/tools/common/lib';

use lib '/app/tools/rps/lib';

use RPS::Mechanical::CA::MechanicalRun;
use RPS::DB::Item::CAMechanicalRun;

use Common::FormObject;
use base 'Common::FormObject';

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

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

    $self->{MechanicalRun} = [];

    my $collection = RPS::DB::Item::CAMechanicalRun->GetAll();

    while ( $collection->hasNext() ) {
        my $obj = $collection->next();

        push @{ $self->{MechanicalRun} }, RPS::Mechanical::CA::MechanicalRun->new( _dbItem => $obj, loadSubs => 0 );
    }

    return $self;
}

1;

