Neoview Guide to Stored Procedures in Java (R2.2)

8 Performance and Troubleshooting..............................................................................73
Troubleshooting Common Problems....................................................................................................73
Performance Tip....................................................................................................................................73
A Sample SPJs..................................................................................................................75
Procedures in the SALES Schema.........................................................................................................75
LOWERPRICE Procedure................................................................................................................76
Java Method: lowerPrice()..........................................................................................................76
Creating the Procedure: LOWERPRICE....................................................................................76
Calling the Procedure: LOWERPRICE.......................................................................................77
DAILYORDERS Procedure..............................................................................................................78
Java Method: numDailyOrders()...............................................................................................78
Creating the Procedure: DAILYORDERS...................................................................................78
Calling the Procedure: DAILYORDERS.....................................................................................79
MONTHLYORDERS Procedure......................................................................................................80
Java Method: numMonthlyOrders()..........................................................................................80
Creating the Procedure: MONTHLYORDERS...........................................................................80
Calling the Procedure: MONTHLYORDERS.............................................................................81
TOTALPRICE Procedure.................................................................................................................82
Java Method: totalPrice()............................................................................................................82
Creating the Procedure: TOTALPRICE......................................................................................82
Calling the Procedure: TOTALPRICE........................................................................................83
PARTDATA Procedure....................................................................................................................84
Java Method: partData().............................................................................................................84
Creating the Procedure: PARTDATA.........................................................................................85
Calling the Procedure: PARTDATA...........................................................................................86
ORDERSUMMARY Procedure........................................................................................................88
Java Method: orderSummary()..................................................................................................88
Creating the Procedure: ORDERSUMMARY............................................................................89
Calling the Procedure: ORDERSUMMARY...............................................................................89
Procedures in the PERSNL Schema......................................................................................................90
ADJUSTSALARY Procedure...........................................................................................................91
Java Method: adjustSalary().......................................................................................................91
Creating the Procedure: ADJUSTSALARY................................................................................91
Calling the Procedure: ADJUSTSALARY..................................................................................92
EMPLOYEEJOB Procedure..............................................................................................................93
Java Method: employeeJob()......................................................................................................93
Creating the Procedure: EMPLOYEEJOB..................................................................................93
Calling the Procedure: EMPLOYEEJOB.....................................................................................93
PROJECTTEAM Procedure.............................................................................................................95
Java Method: projectTeam().......................................................................................................95
Creating the Procedure: PROJECTTEAM..................................................................................95
Calling the Procedure: PROJECTTEAM....................................................................................95
TOPSALESREPS Procedure............................................................................................................96
Java Method: topSalesReps()......................................................................................................96
Creating the Procedure: TOPSALESREPS.................................................................................96
Calling the Procedure: TOPSALESREPS...................................................................................97
Procedures in the INVENT Schema......................................................................................................98
SUPPLIERINFO Procedure.............................................................................................................99
Java Method: supplierInfo().......................................................................................................99
Creating the Procedure: SUPPLIERINFO..................................................................................99
Calling the Procedure: SUPPLIERINFO..................................................................................101
SUPPLYNUMBERS Procedure......................................................................................................102
Java Method: supplyQuantities().............................................................................................102
Table of Contents 5