LOGICAL_WORKPLACE_TS
Package LOGICAL_WORKPLACE_TS
logical_workplace_ts.pks
by Don Bales on 12/15/2006
Table LOGICAL_WORKPLACE_T's methods. Contains all the supporting service
methods (functions and procedures) for table LOGICAL_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
get_id
Returns a new primary key id value for a row
get_code_context
Returns the value of a context for the code values in the logical workplace assignment
get_name_context
Returns the value of a context for the name values in the logical workplace assignment
get_row
Returns a LOGICAL_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 LOGICAL_WORKPLACE_T
set_row
Updates or inserts a row matching the passed row into table LOGICAL_WORKPLACE_T
test
Performs unit tests for this package
Method Detail
create_id_context
FUNCTION create_id_context(
ain_parent_id in LOGICAL_WORKPLACE_T.parent_id%TYPE,
ain_id in LOGICAL_WORKPLACE_T.id%TYPE)
return varchar2
Returns an id_context for the specified parent_id and 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_id
FUNCTION get_id
return LOGICAL_WORKPLACE_T.id%TYPE
Returns a new primary key id value for a row.
get_code_context
FUNCTION get_code_context(
ain_id in LOGICAL_WORKPLACE_T.id%TYPE)
return varchar2
Returns the value of a context for the code values in the logical workplace assignment.
get_name_context
FUNCTION get_name_context(
ain_id in LOGICAL_WORKPLACE_T.id%TYPE)
return varchar2
Returns the value of a context for the name values in the logical workplace assignment.
get_row
FUNCTION get_row(
air_logical_workplace in LOGICAL_WORKPLACE_T%ROWTYPE)
return LOGICAL_WORKPLACE_T%ROWTYPE
Returns a LOGICAL_WORKPLACE row for the specified criteria.
There are three sets of criteria. You can retrieve a row by specifying:
1. the primary key: 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 LOGICAL_WORKPLACE_T.parent_id%TYPE,
ain_workplace_type_id in LOGICAL_WORKPLACE_T.workplace_type_id%TYPE,
aiv_code in LOGICAL_WORKPLACE_T.code%TYPE,
aiv_name in LOGICAL_WORKPLACE_T.name%TYPE,
aid_active_date in LOGICAL_WORKPLACE_T.active_date%TYPE)
return LOGICAL_WORKPLACE_T.id%TYPE
Updates or inserts a row matching the passed parameters into table LOGICAL_WORKPLACE_T.
See PROCEDURE set_row( ).
set_row
PROCEDURE set_row(
aior_logical_workplace in out LOGICAL_WORKPLACE_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, 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 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:
physical workplace tslogical assignment tsworkplace type tslo orm2 tsZielony Szerszeń 2010 TS XViD IMAGiNElogical andFanuc 3TF Tak TS LTM L263 82 2Ulotka postępowanie przed TS, procedura i dokumentychap3 tsPunisher War Zone 2008 TS XviD LTRGUlotka Pytania dotyczące TS, ETPCz, TMinstalacje TS 11S40 TS 2 2 ReleaseNoteshw2 2009 tsZbrojenie polaczen TSwięcej podobnych podstron