1: PACKAGE BODY pn_index_leases_pkg AS
2: -- $Header: PNTINLEB.pls 120.4 2007/01/02 07:46:02 pseeram ship $
3:
4: /*============================================================================+
5: | Copyright (c) 2001 Oracle Corporation
136: l_org_ID NUMBER;
137:
138: BEGIN
139:
140: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.insert_row (+)');
141:
142: /* If no INDEX_LEASE_ID is provided, get one from sequence */
143:
144: IF (x_index_lease_id IS NULL)
155: THEN
156: x_index_lease_number := x_index_lease_id;
157: END IF;
158:
159: pn_index_leases_pkg.check_unq_index_lease_number (
160: l_return_status
161: ,x_index_lease_id
162: ,x_index_lease_number);
163:
424: ,x_proration_period_start_date IN DATE)
425: IS
426: l_return_status VARCHAR2 (30) := NULL;
427: BEGIN
428: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.update_row (+)');
429: pn_index_leases_pkg.check_unq_index_lease_number (
430: l_return_status
431: ,x_index_lease_id
432: ,x_index_lease_number);
425: IS
426: l_return_status VARCHAR2 (30) := NULL;
427: BEGIN
428: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.update_row (+)');
429: pn_index_leases_pkg.check_unq_index_lease_number (
430: l_return_status
431: ,x_index_lease_id
432: ,x_index_lease_number);
433:
513: THEN
514: RAISE NO_DATA_FOUND;
515: END IF;
516:
517: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.update_row (-)');
518: END update_row;
519:
520:
521: -------------------------------------------------------------------------------
608:
609: tlinfo c1%ROWTYPE;
610: BEGIN
611:
612: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.lock_row (+)');
613: OPEN c1;
614: FETCH c1 INTO tlinfo;
615: IF (c1%NOTFOUND)
616: THEN
867: OR ((tlinfo.PRORATION_PERIOD_START_DATE IS NULL) AND (X_PRORATION_PERIOD_START_DATE IS NULL))) THEN
868: pn_var_rent_pkg.lock_row_exception('VR_NBP_FLAG',tlinfo.PRORATION_PERIOD_START_DATE);
869: END IF;
870:
871: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.lock_row (-)');
872:
873: END lock_row;
874:
875:
884: PROCEDURE delete_row (
885: x_rowid IN VARCHAR2)
886: IS
887: BEGIN
888: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.delete_row (+)');
889: DELETE FROM pn_index_leases_all
890: WHERE ROWID = x_rowid;
891:
892: IF (SQL%NOTFOUND)
892: IF (SQL%NOTFOUND)
893: THEN
894: RAISE NO_DATA_FOUND;
895: END IF;
896: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.delete_row (-)');
897: END delete_row;
898:
899: -------------------------------------------------------------------------------
900: -- PROCDURE : delete_row
906: -------------------------------------------------------------------------------
907: PROCEDURE delete_row (
908: x_index_lease_id IN NUMBER) IS
909: BEGIN
910: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.delete_row (+)');
911: DELETE FROM pn_index_leases_all
912: WHERE index_lease_id = x_index_lease_id;
913:
914: IF (SQL%NOTFOUND)
915: THEN
916: RAISE NO_DATA_FOUND;
917: END IF;
918:
919: PNP_DEBUG_PKG.debug (' PN_INDEX_LEASES_PKG.delete_row (-)');
920: END delete_row;
921:
922:
923:
952: x_return_status := 'E';
953: END check_unq_index_lease_number;
954:
955:
956: END pn_index_leases_pkg;
957:
958: