work assignment ts




WORK_ASSIGNMENT_TS



Package WORK_ASSIGNMENT_TS

work_assignment_ts.pks
by Donald J. Bales on 12/15/2006
Table WORK_ASSIGNMENT_T's methods



Global Constants and Variables



Keep track of the number of inserts and updates to made by set_row().

n_inserted number := 0;
n_updated number := 0;



Method Summary
get_id
Returns a new primary key id value for a row
get_work
Returns a the WORK row for the specified worker_id and on the specified date
get_work
Returns a the current WORK row for the specified worker_id
get_row
Returns a WORK_ASSIGNMENT row for the specified criteria
help
Test-based help for this package
is_active
Returns TRUE if the worker has a work assignment on the specified date, otherwise FALSE
is_active
Returns TRUE if the worker currently has a work assignment, otherwise FALSE
set_row
Updates or inserts a row matching the passed row into table WORK_WORKPLACE_T
test
The test unit for this package



Method Detail

get_id

FUNCTION get_id
return WORK_ASSIGNMENT_T.id%TYPE


Returns a new primary key id value for a row.


get_work

FUNCTION get_work(
ain_worker_id in WORK_ASSIGNMENT_T.worker_id%TYPE,
aid_on in WORK_ASSIGNMENT_T.active_date%TYPE)
return WORK_T%ROWTYPE


Returns a the WORK row for the specified worker_id and on the specified date.


get_work

FUNCTION get_work(
ain_worker_id in WORK_ASSIGNMENT_T.worker_id%TYPE)
return WORK_T%ROWTYPE


Returns a the current WORK row for the specified worker_id.


get_row

FUNCTION get_row(
air_work_assignment in WORK_ASSIGNMENT_T%ROWTYPE)
return WORK_ASSIGNMENT_T%ROWTYPE


Returns a WORK_ASSIGNMENT row for the specified criteria.

There are two sets of criteria. You can retrieve a row by specifying:
1. the primary key: id
2. the woker_id and active_date

If a match is found the function returns the corresponding row, otherwise
it returns NULL. It will raise any exceptions except NO_DATA_FOUND.


help

PROCEDURE help


Test-based help for this package. "set serveroutput on" in SQL*Plus.


is_active

FUNCTION is_active(
ain_worker_id in WORK_ASSIGNMENT_T.worker_id%TYPE,
aid_on in date)
return boolean


Returns TRUE if the worker has a work assignment on the specified date, otherwise FALSE.


is_active

FUNCTION is_active(
ain_worker_id in WORK_ASSIGNMENT_T.worker_id%TYPE)
return boolean


Returns TRUE if the worker currently has a work assignment, otherwise FALSE.


set_row

PROCEDURE set_row(
aior_work_assignment in out WORK_ASSIGNMENT_T%ROWTYPE)


Updates or inserts a row matching the passed row into table WORK_WORKPLACE_T.

First, set_row( ) calls get_row( ) to try to find a matching row that already
exists in the database. So you need to set the id, or worked_id
and active_date appropriately in order to properly detect an existing row.

Next, if an existing row is found, any non-key data items are updated to match
the passed row. Otherwise a new row is inserted, including the allocation of
a new primary key value. Upon inserting a new value, the id
value is updated in the passed row.
See PROCEDURE get_row( );


test

PROCEDURE test


The test unit for this package.






Wyszukiwarka

Podobne podstrony:
physical assignment ts
logical assignment ts
schedule and assign work?D813F6
work ts
lo orm2 ts
Zielony Szerszeń 2010 TS XViD IMAGiNE
121010141958?c english at work episode6
schedule and assign workcD7C4DF
Cisco2 Assignments
120702094621 english at work episode! final
Fanuc 3TF Tak TS LTM L263 82 2
Ulotka postępowanie przed TS, procedura i dokumenty
assignmenttype
120829102127?c english at work episode) en
assignmenttype
assignments view done text

więcej podobnych podstron