package Support::SaleFileExplorer::PeriodList;

use strict;

use lib '/app/tools/common/lib';
use lib '/app/tools/raptor/lib';
use lib '/app/tools/support/lib';
use Common::XMLObject;
use base 'Common::XMLObject';

use Raptor::DB::Item::Period;
use Support::SaleFileExplorer::Period;

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

    my $allPeriods = Raptor::DB::Item::Period->GetAllSortedByPeriodID();
    while ( my $periodDBItem = $allPeriods->next() ) {
        push @{ $self->{Period} }, Support::SaleFileExplorer::Period->new( dbItem => $periodDBItem );
    }

    return $self;
}

1;
