#---------------------------------------------------------------
# ____                   _ _         ____  _
#|  _ \ ___  _   _  __ _| | |_ _   _/ ___|| |__   __ _ _ __ ___
#| |_) / _ \| | | |/ _` | | __| | | \___ \| '_ \ / _` | '__/ _ \
#|  _ < (_) | |_| | (_| | | |_| |_| |___) | | | | (_| | | |  __/
#|_| \_\___/ \__, |\__,_|_|\__|\__, |____/|_| |_|\__,_|_|  \___|
#            |___/             |___/
#
# Copyright (C) 2010 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#---------------------------------------------------------------
package BookPub::DB::Item::Publisher;

use strict;
use warnings;

use lib '/app/tools/common/lib';
use lib '/app/tools/bookpub/lib';
use base 'Common::DB::Item';

use constant kTable => 'publisher';
use constant kDB    => Common::DB::Item::kClientDB;

sub mapKey { return 'publisher_id'; }
sub mapVal { return 'name'; }

sub GetAllSortedByName {
    my ($class) = @_;

    my $sql = "SELECT * FROM " . kTable . " ORDER BY name";
    return $class->GetAll($sql);
}

1;
