#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::DB::Item::LicenseReserveLiquidation;
use strict;
use warnings;
use lib '/app/tools/common/lib';
use Common::DB::Item;
use base 'Common::DB::Item';

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

sub GetByIDAndType {
    my ( $class, $id, $type ) = @_;

    my $sql = "SELECT * FROM license_reserve_liquidation WHERE license_id=$id AND type=$type ORDER BY period";

    return $class->GetAll($sql);
}

# !!! License_id needs to be changed to track_license_id
# (XXX) Ok, now I'm confused. THIS is the method that
# should be deprecated.
sub GetLicenseReserveLiquidationsByTrackLicenseID {
    my ( $class, $id ) = @_;

    my $sql = "SELECT * FROM license_reserve_liquidation WHERE license_id=$id ORDER BY period";
    return $class->GetAll($sql);

}

###
1;    #
###

