physical workplace ts




PHYSICAL_WORKPLACE_TS



Package PHYSICAL_WORKPLACE_TS

id_ts.pks
Copyright by Don Bales on 12/15/2006
Table PHYSICAL_WORKPLACE_T's methods. Contains all the supporting service
methods (functions and procedures) for table PHYSICAL_WORKPLACE_T.



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
create_id_context
Returns an id_context for the specified parent_id and id_id
get_code_context
Returns the value of a context for the code values in the physical workplace assignment
get_id
Returns a new primary key id value for a row
get_id_context
Returns the value of a context for the id values in the logical workplace assignment
get_name_context
Returns the value of a context for the name values in the physical workplace assignment
get_row
Returns a PHYSICAL_WORKPLACE row for the specified criteria
help
Test-based help for this package
set_row
Updates or inserts a row matching the passed parameters into table PHYSICAL_WORKPLACE_T
set_row
Updates or inserts a row matching the passed row into table PHYSICAL_WORKPLACE_T
test
Performs unit tests for this package



Method Detail

create_id_context

FUNCTION create_id_context(
ain_parent_id in PHYSICAL_WORKPLACE_T.parent_id%TYPE,
ain_id_id in PHYSICAL_WORKPLACE_T.id%TYPE)
return varchar2


Returns an id_context for the specified parent_id and id_id.
Whatever creates a new row must also call this mehtod to create an appropriate
id_context value. Method set_row() does this for you.


get_code_context

FUNCTION get_code_context(
ain_id_id in PHYSICAL_WORKPLACE_T.id%TYPE)
return varchar2


Returns the value of a context for the code values in the physical workplace assignment.


get_id

FUNCTION get_id
return PHYSICAL_WORKPLACE_T.id%TYPE


Returns a new primary key id value for a row.


get_id_context

FUNCTION get_id_context(
ain_id_id in PHYSICAL_WORKPLACE_T.id%TYPE)
return varchar2


Returns the value of a context for the id values in the logical workplace assignment.


get_name_context

FUNCTION get_name_context(
ain_id_id in PHYSICAL_WORKPLACE_T.id%TYPE)
return varchar2


Returns the value of a context for the name values in the physical workplace assignment.


get_row

FUNCTION get_row(
air_id in PHYSICAL_WORKPLACE_T%ROWTYPE)
return PHYSICAL_WORKPLACE_T%ROWTYPE


Returns a PHYSICAL_WORKPLACE row for the specified criteria.
There are three sets of criteria. You can retrieve a row by specifying:
1. the primary key: id_id
2. the unique id_context
3. the code, name, 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.


set_row

FUNCTION set_row(
ain_parent_id in PHYSICAL_WORKPLACE_T.parent_id%TYPE,
ain_workplace_type_id in PHYSICAL_WORKPLACE_T.workplace_type_id%TYPE,
aiv_code in PHYSICAL_WORKPLACE_T.code%TYPE,
aiv_name in PHYSICAL_WORKPLACE_T.name%TYPE,
aid_active_date in PHYSICAL_WORKPLACE_T.active_date%TYPE)
return PHYSICAL_WORKPLACE_T.id%TYPE


Updates or inserts a row matching the passed parameters into table PHYSICAL_WORKPLACE_T.
See PROCEDURE set_row( ).


set_row

PROCEDURE set_row(
aior_id in out PHYSICAL_WORKPLACE_T%ROWTYPE)


Updates or inserts a row matching the passed row into table PHYSICAL_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_id, id_context,
and code, name and active_date appropriately in order to prperly detect an
existing row.
Next, if an existing row is found, any non-key data items are updated to match
the passed row. Otherwise, and new row is inserted, including the allocation of
a new primary key and id_context value. Upon inserting a new value, the
id_id and id_context values are updated in the passed row.
See PROCEDURE get_row( );


test

PROCEDURE test


Performs unit tests for this package.






Wyszukiwarka

Podobne podstrony:
logical workplace ts
physical assignment ts
workplace type ts
lo orm2 ts
Albert Einstein Principles Of Theoretical Physics
Anaxagoras # Vlastos (The Physical Theory Of Anaxagoras) Bb
Zielony Szerszeń 2010 TS XViD IMAGiNE
Fanuc 3TF Tak TS LTM L263 82 2
Physical Constants 2001
Feynman Lectures on Physics Volume 1 Chapter
Ulotka postępowanie przed TS, procedura i dokumenty
chap3 ts
Punisher War Zone 2008 TS XviD LTRG
Ulotka Pytania dotyczące TS, ETPCz, TM
instalacje TS 11
S40 TS 2 2 ReleaseNotes

więcej podobnych podstron