The following lines contain the word 'select', 'insert', 'update' or 'delete':
| INSERT_ROW - insert a row into PN_INDEX_LEASE_PERIODS.
| DELETE_ROW - deletes a row from PN_INDEX_LEASE_PERIODS.
| UPDATE_ROW - updates a row from PN_INDEX_LEASE_PERIODS.
| LOCKS_ROW - will check if a row has been modified since
| being queried by form.
|
|
| HISTORY
| 21-MAY-2001 jbreyes o Created
| 13-DEC-2001 Mrinal Misra o Added dbdrv command.
| 15-JAN-2002 Mrinal Misra o In dbdrv command changed phase=pls to phase=plb
| Added checkfile.Ref. Bug# 2184724.
| 09-JUL-2002 ftanudja o added x_org_id param in insert_row for
| shared services enh.
| 23-JUL-2002 ftanudja o changed lock_row comply with new standards.
| 02-Aug-2002 psidhu o added parameters op_constraint_applied_amount
| and op_carry_forward_amount in call to
| pn_index_amount_pkg.calculate_period. Added call
| to pn_index_amount_pkg.calculate_subsequent_periods.
| 20-Oct-2002 psidhu o added parameters op_constraint_applied_percent
| and op_carry_forward_percent in call to
| procedure pn_index_amount_pkg.calculate_period.
| 05-Jul-2005 hrodda o overloaded delete_row proc to take PK as parameter
| 09-NOV-2006 Prabhakar o Added index_multiplier to insert/update/lock.
+============================================================================*/
-------------------------------------------------------------------------------
-- PROCDURE : INSERT_ROW
-- INVOKED FROM : insert_row procedure
-- PURPOSE : inserts the row
-- HISTORY :
-- 04-JUL-05 hrodda o Bug 4284035 - Replaced pn_index_lease_periods with
-- _ALL table.
-- 09-NOV-06 Prabhakar o Added index_multiplier to insert_row.
-------------------------------------------------------------------------------
PROCEDURE insert_row
(
x_rowid IN OUT NOCOPY VARCHAR2
,x_org_id IN NUMBER
,x_index_period_id IN OUT NOCOPY NUMBER
,x_index_lease_id IN NUMBER
,x_line_number IN OUT NOCOPY NUMBER
,x_assessment_date IN DATE
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_creation_date IN DATE
,x_created_by IN NUMBER
,x_basis_start_date IN DATE
,x_basis_end_date IN DATE
,x_index_finder_date IN DATE
,x_current_index_line_id IN NUMBER
,x_current_index_line_value IN NUMBER
,x_previous_index_line_id IN NUMBER
,x_previous_index_line_value IN NUMBER
,x_current_basis IN NUMBER
,x_relationship IN VARCHAR2
,x_index_percent_change IN NUMBER
,x_basis_percent_change IN NUMBER
,x_unconstraint_rent_due IN NUMBER
,x_constraint_rent_due IN NUMBER
,x_last_update_login IN NUMBER
,x_attribute_category IN VARCHAR2
,x_attribute1 IN VARCHAR2
,x_attribute2 IN VARCHAR2
,x_attribute3 IN VARCHAR2
,x_attribute4 IN VARCHAR2
,x_attribute5 IN VARCHAR2
,x_attribute6 IN VARCHAR2
,x_attribute7 IN VARCHAR2
,x_attribute8 IN VARCHAR2
,x_attribute9 IN VARCHAR2
,x_attribute10 IN VARCHAR2
,x_attribute11 IN VARCHAR2
,x_attribute12 IN VARCHAR2
,x_attribute13 IN VARCHAR2
,x_attribute14 IN VARCHAR2
,x_attribute15 IN VARCHAR2
,x_index_multiplier IN NUMBER)
IS
CURSOR c IS
SELECT ROWID
FROM pn_index_lease_periods_all
WHERE index_period_id = x_index_period_id;
SELECT org_id FROM pn_index_leases_all WHERE index_lease_id = x_index_lease_id;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.insert_row (+)');
SELECT pn_index_lease_periods_s.NEXTVAL
INTO x_index_period_id
FROM DUAL;
SELECT NVL(MAX (line_number),0) + 1
INTO x_line_number
FROM pn_index_lease_periods_all a
WHERE index_lease_id = x_index_lease_id
AND a.org_id = x_org_id;
INSERT INTO pn_index_lease_periods_all
(
index_period_id
,org_id
,index_lease_id
,line_number
,assessment_date
,last_update_date
,last_updated_by
,creation_date
,created_by
,basis_start_date
,basis_end_date
,index_finder_date
,current_index_line_id
,current_index_line_value
,previous_index_line_id
,previous_index_line_value
,current_basis
,relationship
,index_percent_change
,basis_percent_change
,unconstraint_rent_due
,constraint_rent_due
,last_update_login
,attribute_category
,attribute1
,attribute2
,attribute3
,attribute4
,attribute5
,attribute6
,attribute7
,attribute8
,attribute9
,attribute10
,attribute11
,attribute12
,attribute13
,attribute14
,attribute15
,index_multiplier)
VALUES
(
x_index_period_id
,l_org_id
,x_index_lease_id
,x_line_number
,x_assessment_date
,x_last_update_date
,x_last_updated_by
,x_creation_date
,x_created_by
,x_basis_start_date
,x_basis_end_date
,x_index_finder_date
,x_current_index_line_id
,x_current_index_line_value
,x_previous_index_line_id
,x_previous_index_line_value
,x_current_basis
,x_relationship
,x_index_percent_change
,x_basis_percent_change
,x_unconstraint_rent_due
,x_constraint_rent_due
,x_last_update_login
,x_attribute_category
,x_attribute1
,x_attribute2
,x_attribute3
,x_attribute4
,x_attribute5
,x_attribute6
,x_attribute7
,x_attribute8
,x_attribute9
,x_attribute10
,x_attribute11
,x_attribute12
,x_attribute13
,x_attribute14
,x_attribute15
,x_index_multiplier);
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.insert_row (-)');
END insert_row;
PROCEDURE update_row (
x_rowid IN VARCHAR2
,x_index_period_id IN NUMBER
,x_index_lease_id IN NUMBER
,x_line_number IN NUMBER
,x_assessment_date IN DATE
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_basis_start_date IN DATE
,x_basis_end_date IN DATE
,x_index_finder_date IN DATE
,x_current_index_line_id IN NUMBER
,x_current_index_line_value IN NUMBER
,x_previous_index_line_id IN NUMBER
,x_previous_index_line_value IN NUMBER
,x_current_basis IN NUMBER
,x_relationship IN VARCHAR2
,x_index_percent_change IN NUMBER
,x_basis_percent_change IN NUMBER
,x_unconstraint_rent_due IN NUMBER
,x_constraint_rent_due IN NUMBER
,x_last_update_login IN NUMBER
,x_attribute_category IN VARCHAR2
,x_attribute1 IN VARCHAR2
,x_attribute2 IN VARCHAR2
,x_attribute3 IN VARCHAR2
,x_attribute4 IN VARCHAR2
,x_attribute5 IN VARCHAR2
,x_attribute6 IN VARCHAR2
,x_attribute7 IN VARCHAR2
,x_attribute8 IN VARCHAR2
,x_attribute9 IN VARCHAR2
,x_attribute10 IN VARCHAR2
,x_attribute11 IN VARCHAR2
,x_attribute12 IN VARCHAR2
,x_attribute13 IN VARCHAR2
,x_attribute14 IN VARCHAR2
,x_attribute15 IN VARCHAR2
,x_index_multiplier IN NUMBER
,x_constraint_applied_amount IN NUMBER
,x_constraint_applied_percent IN NUMBER)
IS
l_return_status VARCHAR2 (30) := NULL;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.update_row (+)');
UPDATE pn_index_lease_periods_all
SET index_lease_id = x_index_lease_id
,line_number = x_line_number
,assessment_date = x_assessment_date
,last_update_date = x_last_update_date
,last_updated_by = x_last_updated_by
,basis_start_date = x_basis_start_date
,basis_end_date = x_basis_end_date
,index_finder_date = x_index_finder_date
,current_index_line_id = x_current_index_line_id
,current_index_line_value = x_current_index_line_value
,previous_index_line_id = x_previous_index_line_id
,previous_index_line_value = x_previous_index_line_value
,current_basis = x_current_basis
,relationship = x_relationship
,index_percent_change = x_index_percent_change
,basis_percent_change = x_basis_percent_change
,unconstraint_rent_due = x_unconstraint_rent_due
,constraint_rent_due = x_constraint_rent_due
,last_update_login = x_last_update_login
,attribute_category = x_attribute_category
,attribute1 = x_attribute1
,attribute2 = x_attribute2
,attribute3 = x_attribute3
,attribute4 = x_attribute4
,attribute5 = x_attribute5
,attribute6 = x_attribute6
,attribute7 = x_attribute7
,attribute8 = x_attribute8
,attribute9 = x_attribute9
,attribute10 = x_attribute10
,attribute11 = x_attribute11
,attribute12 = x_attribute12
,attribute13 = x_attribute13
,attribute14 = x_attribute14
,attribute15 = x_attribute15
,index_multiplier = x_index_multiplier
,constraint_applied_amount = x_constraint_applied_amount
,constraint_applied_percent = x_constraint_applied_percent
WHERE pn_index_lease_periods_all.index_period_id = x_index_period_id;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.update_row (-)');
END update_row;
PROCEDURE update_row_calc (
x_rowid IN VARCHAR2
,x_calculate IN VARCHAR2
,x_updated_flag IN VARCHAR2
,x_index_period_id IN NUMBER
,x_index_lease_id IN NUMBER
,x_line_number IN NUMBER
,x_assessment_date IN DATE
,x_last_update_date IN DATE
,x_last_updated_by IN NUMBER
,x_basis_start_date IN DATE
,x_basis_end_date IN DATE
,x_index_finder_date IN DATE
,x_current_index_line_id IN OUT NOCOPY NUMBER
,x_current_index_line_value IN OUT NOCOPY NUMBER
,x_previous_index_line_id IN OUT NOCOPY NUMBER
,x_previous_index_line_value IN OUT NOCOPY NUMBER
,x_current_basis IN OUT NOCOPY NUMBER
,x_relationship IN VARCHAR2
,x_index_percent_change IN OUT NOCOPY NUMBER
,x_basis_percent_change IN NUMBER
,x_unconstraint_rent_due IN OUT NOCOPY NUMBER
,x_constraint_rent_due IN OUT NOCOPY NUMBER
,x_last_update_login IN NUMBER
,x_attribute_category IN VARCHAR2
,x_attribute1 IN VARCHAR2
,x_attribute2 IN VARCHAR2
,x_attribute3 IN VARCHAR2
,x_attribute4 IN VARCHAR2
,x_attribute5 IN VARCHAR2
,x_attribute6 IN VARCHAR2
,x_attribute7 IN VARCHAR2
,x_attribute8 IN VARCHAR2
,x_attribute9 IN VARCHAR2
,x_attribute10 IN VARCHAR2
,x_attribute11 IN VARCHAR2
,x_attribute12 IN VARCHAR2
,x_attribute13 IN VARCHAR2
,x_attribute14 IN VARCHAR2
,x_attribute15 IN VARCHAR2
,x_carry_forward_flag IN VARCHAR2
,x_index_multiplier IN NUMBER
,x_constraint_applied_amount IN NUMBER
,x_constraint_applied_percent IN NUMBER)
IS
l_return_status VARCHAR2 (30) := NULL;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.update_row_calc (+)');
UPDATE pn_index_lease_periods_all
SET index_lease_id = x_index_lease_id
,line_number = x_line_number
,assessment_date = x_assessment_date
,last_update_date = x_last_update_date
,last_updated_by = x_last_updated_by
,basis_start_date = x_basis_start_date
,basis_end_date = x_basis_end_date
,index_finder_date = x_index_finder_date
,current_index_line_id = x_current_index_line_id
,current_index_line_value = x_current_index_line_value
,previous_index_line_id = x_previous_index_line_id
,previous_index_line_value = x_previous_index_line_value
,current_basis = x_current_basis
,relationship = x_relationship
,index_percent_change = x_index_percent_change
,basis_percent_change = x_basis_percent_change
,unconstraint_rent_due = x_unconstraint_rent_due
,constraint_rent_due = x_constraint_rent_due
,last_update_login = x_last_update_login
,attribute_category = x_attribute_category
,attribute1 = x_attribute1
,attribute2 = x_attribute2
,attribute3 = x_attribute3
,attribute4 = x_attribute4
,attribute5 = x_attribute5
,attribute6 = x_attribute6
,attribute7 = x_attribute7
,attribute8 = x_attribute8
,attribute9 = x_attribute9
,attribute10 = x_attribute10
,attribute11 = x_attribute11
,attribute12 = x_attribute12
,attribute13 = x_attribute13
,attribute14 = x_attribute14
,attribute15 = x_attribute15
,index_multiplier = x_index_multiplier
,constraint_applied_amount = x_constraint_applied_amount
,constraint_applied_percent = x_constraint_applied_percent
WHERE pn_index_lease_periods_all.index_period_id = x_index_period_id;
UPDATE pn_index_lease_periods_all
SET index_lease_id = x_index_lease_id
,line_number = x_line_number
,assessment_date = x_assessment_date
,last_update_date = x_last_update_date
,last_updated_by = x_last_updated_by
,basis_start_date = x_basis_start_date
,basis_end_date = x_basis_end_date
,index_finder_date = x_index_finder_date
,current_index_line_id = x_current_index_line_id
,current_index_line_value = x_current_index_line_value
,previous_index_line_id = x_previous_index_line_id
,previous_index_line_value = x_previous_index_line_value
,current_basis = x_current_basis
,relationship = x_relationship
,index_percent_change = x_index_percent_change
,basis_percent_change = x_basis_percent_change
,unconstraint_rent_due = x_unconstraint_rent_due
,constraint_rent_due = x_constraint_rent_due
,constraint_applied_amount = l_constraint_applied_amount
,carry_forward_amount = l_carry_forward_amount
,constraint_applied_percent = l_constraint_applied_percent
,carry_forward_percent = l_carry_forward_percent
,last_update_login = x_last_update_login
,attribute_category = x_attribute_category
,attribute1 = x_attribute1
,attribute2 = x_attribute2
,attribute3 = x_attribute3
,attribute4 = x_attribute4
,attribute5 = x_attribute5
,attribute6 = x_attribute6
,attribute7 = x_attribute7
,attribute8 = x_attribute8
,attribute9 = x_attribute9
,attribute10 = x_attribute10
,attribute11 = x_attribute11
,attribute12 = x_attribute12
,attribute13 = x_attribute13
,attribute14 = x_attribute14
,attribute15 = x_attribute15
,index_multiplier = x_index_multiplier
WHERE index_period_id = x_index_period_id;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.update_row_calc (-)');
END update_row_calc;
SELECT *
FROM pn_index_lease_periods_all
WHERE index_period_id = x_index_period_id
FOR UPDATE OF index_period_id NOWAIT;
PROCEDURE delete_row (x_rowid IN VARCHAR2)
IS
BEGIN
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.delete_row (+)');
DELETE FROM pn_index_lease_periods_all
WHERE ROWID = x_rowid;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.delete_row (-)');
END delete_row;
PROCEDURE delete_row (x_index_period_id IN NUMBER)
IS
BEGIN
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.delete_row (+)');
DELETE FROM pn_index_lease_periods_all
WHERE index_period_id = x_index_period_id;
PNP_DEBUG_PKG.debug (' PN_INDEX_LEASE_PERIODS_PKG.delete_row (-)');
END delete_row;