The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::Dochazka::REST::Model::Schedintvls - object class for "scratch schedules"

VERSION

Version 0.125

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

Special accessors that do not necessarily correspond to columns in the database table. These functions return whatever value happens to be associated with the object, with no guarantee that it matches the database.

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>