NAME

Peace::DAO::Application - The database access object of applications.

SYNOPSIS

my $application_dao = Peace::DAO::Application->new(
  dbh => $dbh,
);

$application_dao->create( application => $application );

my $application = $application_dao->recover_by_uuid( uuid => $uuid);

my $applications = $application_dao->recover_by_developer( developer => $developer );

DESCRIPTION

Peace::DAO::Application allows you to make database operations over the applications table like recover or create.

INSTANCE METHODS

Peace::DAO::Application implements the following instance methods:

new

my $application_dao = Peace::DAO::Application->new(
   dbh => $dbh,
);

Instances a Peace::DAO::Application object.

METHODS

Peace::DAO::Application implements the following methods:

create

$application_dao->create( application => $application );

Takes a Peace::Model::Application and creates its representation in database.

As a side effect sets the fields uuid and date_creation in the passed object.

recover_by_uuid

my $application = $application_dao->recover_by_uuid(
  uuid => $uuid,
);

Recovers from database a Peace::Model::Application from its uuid.

recover_by_developer

my $applications = $application_dao->recover_by_developer(
  developer => $developer,
);

Recovers a arrayref of Peace::Model::Application from its Peace::Model::Developer.

SEE ALSO

Peace::DB, Peace::Model::Developer, Peace::Model::Application