NAME
App::Dochazka::REST::Model::Activity - activity data model
VERSION
Version 0.072
SYNOPSIS
use App::Dochazka::REST::Model::Activity;
...
EXPORTS
This module provides the following exports:
METHODS
spawn
Activity constructor. For details, see Employee.pm->spawn.
reset
Instance method. Resets object, either to its primal state (no arguments) or to the state given in PARAMHASH.
Accessor methods
Basic accessor methods for all the fields of employees table. These functions return whatever value happens to be associated with the object, with no guarantee that it matches the database.
aid
Accessor method.
code
Accessor method.
long_desc
Accessor method.
remark
Accessor method.
insert
Instance method. Takes the object, as it is, and attempts to insert it into the database. On success, overwrites object attributes with field values actually inserted. Returns a status object.
update
Instance method. Assuming that the object has been prepared, i.e. the AID corresponds to the activity to be updated and the attributes have been changed as desired, this function runs the actual UPDATE, hopefully bringing the database into line with the object. Overwrites all the object's attributes with the values actually written to the database. Returns status object.
delete
Instance method. Assuming the AID really corresponds to the activity to be deleted, this method will execute the DELETE statement in the database. It won't succeed if the activity has any intervals associated with it. Returns a status object.
load_by_aid
Instance method. Loads activity from database, by AID, into existing object, overwriting whatever was there before. The AID value given must be an exact match. Returns a status object.
load_by_code
Instance method. Loads activity from database, by the code provided in the argument list, into existing object, overwriting whatever might have been there before. The code must be an exact match. Returns a status object.
_load
Load activity, by aid or code, into an existing object, overwriting whatever was there before. The search key (aid or code) must be an exact match: this function returns only 1 or 0 records. Takes one of the two following PARAMHASHes:
dbh => $dbh, code => $code
dbh => $dbh, aid => $aid
FUNCTIONS
The following functions are not object methods.
aid_by_code
** NO ACL CHECK ** Given a database handle and a code, attempt ot retrieve the AID corresponding to the code. Returns AID or undef on failure.
AUTHOR
Nathan Cutler, <presnypreklad@gmail.com>