#---------------------------------------------------------------
# ____                   _ _         ____  _
#|  _ \ ___  _   _  __ _| | |_ _   _/ ___|| |__   __ _ _ __ ___
#| |_) / _ \| | | |/ _` | | __| | | \___ \| '_ \ / _` | '__/ _ \
#|  _ < (_) | |_| | (_| | | |_| |_| |___) | | | | (_| | | |  __/
#|_| \_\___/ \__, |\__,_|_|\__|\__, |____/|_| |_|\__,_|_|  \___|
#            |___/             |___/
#
# Copyright (C) 2011 RoyaltyShare, Inc.   All Rights Reserved
#---------------------------------------------------------------

package Report::DB::Item::ReportParameter;
use strict;
use warnings;
use lib '/app/tools/common/lib';
use Common::DB::Item;
use Common::Assert;
use base 'Common::DB::Item';

use constant kTable => 'report_parameter';
use constant kDB    => Common::DB::Item::kClientDB();

sub GetAllForID {
    my ( $class, $id ) = @_;
    assert($id);

    return $class->GetAll( "SELECT * FROM " . kTable . " WHERE report_id=" . $class->quote($id) );
}

sub DeleteForID {
    my ( $class, $id ) = @_;
    assert($id);

    my $dbo = Common::RSApp::GetClientDB();
    $dbo->DoCmd( "DELETE FROM " . kTable . " WHERE report_id=" . $class->quote($id) );
}

1;
