1.
2.
3. public int getAmount()
4. { int
temp=0;
5. int test=this.getAccountId();
6. try
7. {
8. Class.forName("com.mysql.jdbc.Driver");
9. Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/allovermfb","root", "");
10. PreparedStatement stmt= con.prepareStatement("SELECT AMOUNT FROM SAVINGS_ACTIVITY_DETAILS WHERE ACCOUNT_ID =? AND AMOUNT >200000 AND Flag =1 AND ACCOUNT_ACTION_ID =6 AND Treated =0 ORDER BY created_date DESC");
11. stmt.setInt(1,
test);
12. ResultSet results = stmt.executeQuery();
13. while(results.next())
14. {
15. temp= results.getInt("AMOUNT");
16.
17. }
stmt.close();
18. }catch(Exception e)
19. {
20. System.out.println("listing erore" + e);
21. }
22. return temp;
23. }
24.
25. public void setAmount(int amount){
26. this.amount=amount;
27. }
28. }