NAME
App::Dochazka::REST::Model::Schedintvls - object class for "scratch schedules"
VERSION
Version 0.135
SYNOPSIS
use App::Dochazka::REST::Model::Schedintvls;
...
EXPORTS
This module provides the following exports:
METHODS
spawn
Constructor. See Employee.pm->spawn for general comments.
reset
Instance method. Resets object, either to its primal state (no arguments) or to the state given in PARAMHASH.
populate
Populate the schedintvls object (called automatically by 'reset' method which is, in turn, called automatically by 'spawn')
Accessor methods
Boilerplate.
scratch_sid
Accessor method.
intvls
Accessor method.
schedule
Accessor method.
load
Instance method. Once the scratch intervals are inserted, we have a fully populated object. This method runs each scratch interval through the stored procedure 'translate_schedintvl' -- upon success, it creates a new attribute, $self->{schedule}
, containing the translated intervals.
insert
Instance method. Attempts to INSERT one or more records (one for each interval in the 'intvls' attribute) into the 'schedintvls' table. Field values are taken from the object. Returns a status object.
update
There is no update method for schedintvls. Instead, delete and re-create.
delete
Instance method. Once we are done with the scratch intervals, they can be deleted. Returns a status object.
json
Instance method. Returns a JSON string representation of the schedule.
FUNCTIONS
Exported functions
Non-exported functions
_next_scratch_sid
Get next value from the scratch_sid_seq sequence
AUTHOR
Nathan Cutler, <presnypreklad@gmail.com>