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

use strict;
use warnings;
use Carp;

use lib '/app/tools/common/lib';
use Common::Assert;

use lib '/app/tools/rps/lib';
use Common::FormObject;
use RPS::Publisher::StatementType;
use RPS::DB::Item::StatementType;

use base 'Common::FormObject';

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

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

    $self->{StatementType} = [];
    my $collection = RPS::DB::Item::StatementType->GetAll();

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

        push @{ $self->{StatementType} }, new RPS::Publisher::StatementType( _dbItem => $obj );
    }

    return $self;
}

sub _listProperties {
    return { StatementType => 1 };
}

1;

