logical assignment ts




LOGICAL_ASSIGNMENT_TS



Package LOGICAL_ASSIGNMENT_TS

logical_assignment_ts.pks
Copyright by Donald J. Bales on 12/15/2006
Table LOGICAL_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_logical_workplace
Returns a the LOGICAL_WORKPLACE row for the specified worker_id and on the specified date
get_logical_workplace
Returns a the current LOGICAL_WORKPLACE row for the specified worker_id
get_row
Returns a LOGICAL_ASSIGNMENT row for the specified criteria
help
Test-based help for this package
is_active
Returns TRUE if the worker has a logical assignment on the specified date, otherwise FALSE
is_active
Returns TRUE if the worker currently has a logical assignment, otherwise FALSE
set_row
Updates or inserts a row matching the passed row into table LOGICAL_WORKPLACE_T
test
The test unit for this package



Method Detail

get_id

FUNCTION get_id
return LOGICAL_ASSIGNMENT_T.id%TYPE


Returns a new primary key id value for a row.


get_logical_workplace

FUNCTION get_logical_workplace(
ain_worker_id in LOGICAL_ASSIGNMENT_T.worker_id%TYPE,
aid_on in LOGICAL_ASSIGNMENT_T.active_date%TYPE)
return LOGICAL_WORKPLACE_T%ROWTYPE


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


get_logical_workplace

FUNCTION get_logical_workplace(
ain_worker_id in LOGICAL_ASSIGNMENT_T.worker_id%TYPE)
return LOGICAL_WORKPLACE_T%ROWTYPE


Returns a the current LOGICAL_WORKPLACE row for the specified worker_id.


get_row

FUNCTION get_row(
air_logical_assignment in LOGICAL_ASSIGNMENT_T%ROWTYPE)
return LOGICAL_ASSIGNMENT_T%ROWTYPE


Returns a LOGICAL_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 LOGICAL_ASSIGNMENT_T.worker_id%TYPE,
aid_on in date)
return boolean


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


is_active

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


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


set_row

PROCEDURE set_row(
aior_logical_assignment in out LOGICAL_ASSIGNMENT_T%ROWTYPE)


Updates or inserts a row matching the passed row into table LOGICAL_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:
logical workplace ts
physical assignment ts
work assignment ts
lo orm2 ts
Zielony Szerszeń 2010 TS XViD IMAGiNE
schedule and assign workcD7C4DF
logical and
Cisco2 Assignments
Fanuc 3TF Tak TS LTM L263 82 2
Ulotka postępowanie przed TS, procedura i dokumenty
assignmenttype
assignmenttype
assignments view done text
assignable
chap3 ts
Punisher War Zone 2008 TS XviD LTRG

więcej podobnych podstron