Peace/doc/lib/Peace/DAO/Customer.pm.html

92 lines
2.4 KiB
HTML

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Peace::DAO::Customer - The database access object of customer.</title>
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<link href="mailto:Alpine@build-edge-aarch64.nonet" rev="made" />
</head>
<body>
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
<li><a href="#INSTANCE-METHODS">INSTANCE METHODS</a>
<ul>
<li><a href="#new">new</a></li>
</ul>
</li>
<li><a href="#METHODS">METHODS</a>
<ul>
<li><a href="#create">create</a></li>
<li><a href="#recover_by_uuid">recover_by_uuid</a></li>
</ul>
</li>
<li><a href="#SEE-ALSO">SEE ALSO</a></li>
</ul>
<h1 id="NAME">NAME</h1>
<p>Peace::DAO::Customer - The database access object of customer.</p>
<h1 id="SYNOPSIS">SYNOPSIS</h1>
<pre><code>my $customer_dao = Peace::DAO::Customer-&gt;new(
dbh =&gt; $dbh,
);
$customer_dao-&gt;create( customer =&gt; $customer );
my $customer = $customer_dao-&gt;recover_by_uuid(
uuid =&gt; $uuid,
);</code></pre>
<h1 id="DESCRIPTION">DESCRIPTION</h1>
<p>Peace::DAO::Customer allows you to make database operations over the customers table like recover or create.</p>
<h1 id="INSTANCE-METHODS">INSTANCE METHODS</h1>
<p>Peace::DAO::Customer implements the following instance methods:</p>
<h2 id="new">new</h2>
<pre><code>my $customer_dao = Peace::DAO::Customer-&gt;new(
dbh =&gt; $dbh,
);</code></pre>
<p>Takes a database handle and instances a Peace::DAO::Customer object.</p>
<h1 id="METHODS">METHODS</h1>
<h2 id="create">create</h2>
<pre><code>$customer_dao-&gt;create(
customer =&gt; $customer,
);</code></pre>
<p>Takes a <a href="../Model/Customer.pm.html">Peace::Model::Customer</a> object and creates its database representation.</p>
<p>As a side effect sets the fields uuid and date_creation in the passed object.</p>
<h2 id="recover_by_uuid">recover_by_uuid</h2>
<pre><code>my $customer = $customer_dao-&gt;recover_by_uuid(
uuid =&gt; $uuid,
);</code></pre>
<h1 id="SEE-ALSO">SEE ALSO</h1>
<p><a href="../DB.pm.html">Peace::DB</a>, <a href="https://metacpan.org/pod/DBI">DBI</a>, <a href="../Model/Customer.pm.html">Peace::Model::Customer</a></p>
</body>
</html>