You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.4 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //package in.gov.chennaicorporation.gccoffice.pgr.repository;
  2. //
  3. //import java.sql.Connection;
  4. //import java.sql.ResultSet;
  5. //import java.sql.SQLException;
  6. //import java.util.List;
  7. //
  8. //import org.springframework.beans.factory.annotation.Autowired;
  9. //import org.springframework.beans.factory.annotation.Qualifier;
  10. //import org.springframework.jdbc.core.JdbcTemplate;
  11. //import org.springframework.jdbc.core.RowMapper;
  12. //import org.springframework.stereotype.Repository;
  13. //
  14. //import in.gov.chennaicorporation.gccoffice.pgr.dbconnection.DBConnection;
  15. //
  16. //@Repository
  17. //public class Options {
  18. // @Autowired
  19. // DBConnection dbcon;
  20. //
  21. // @Autowired
  22. // @Qualifier("mysqlPGRJdbcTemplate")
  23. // private JdbcTemplate jdbcTemplate; // Use JdbcTemplate or any other Spring Data repository
  24. //
  25. // public List<ComplaintGroup> getComplaintGroups() {
  26. // return jdbcTemplate.query("SELECT * FROM eggr_complaintgroup", new Rowmappercomplaintgroup());
  27. // }
  28. //
  29. // public static class Rowmappercomplaintgroup implements RowMapper<ComplaintGroup> {
  30. // @Override
  31. // public ComplaintGroup mapRow(ResultSet rs, int rowNum) throws SQLException {
  32. // ComplaintGroup complaintGroup = new ComplaintGroup();
  33. //
  34. // Connection con = DBConnection.getConnection();
  35. // stmt3 = con.prepareStatement(query);
  36. // complaintGroup.setId(rs.getLong("id"));
  37. // complaintGroup.setComplaintGroupName(rs.getString("complaint_group_name"));
  38. // return complaintGroup;
  39. // }
  40. // }
  41. //
  42. // public static class ComplaintGroup {
  43. // private Long id;
  44. // private String complaintGroupName;
  45. //
  46. // public long getId() {
  47. // return id;
  48. // }
  49. //
  50. // public void setId(long id) {
  51. // this.id = id;
  52. // }
  53. //
  54. // public String getComplaintGroupName() {
  55. // return complaintGroupName;
  56. // }
  57. //
  58. // public void setComplaintGroupName(String complaintGroupName) {
  59. // this.complaintGroupName = complaintGroupName;
  60. // }
  61. // }
  62. //
  63. // public List<ComplaintType> getComplaintTypes() {
  64. // return jdbcTemplate.query("SELECT * FROM EGGR_COMPLAINTTYPES", new Rowmappercomplainttype());
  65. // }
  66. //
  67. // public static class Rowmappercomplainttype implements RowMapper<ComplaintType> {
  68. // @Override
  69. // public ComplaintType mapRow(ResultSet rs, int rowNum) throws SQLException {
  70. // ComplaintType complaintType = new ComplaintType();
  71. // complaintType.setId(rs.getLong("id"));
  72. // complaintType.setComplaintTypeName(rs.getString("complaint_type_name"));
  73. // return complaintType;
  74. // }
  75. // }
  76. //
  77. // public static class ComplaintType {
  78. // private Long id;
  79. // private String complaintTypeName;
  80. //
  81. // public long getId() {
  82. // return id;
  83. // }
  84. //
  85. // public void setId(long id) {
  86. // this.id = id;
  87. // }
  88. //
  89. // public String getComplaintTypeName() {
  90. // return complaintTypeName;
  91. // }
  92. //
  93. // public void setComplaintTypeName(String complaintTypeName) {
  94. // this.complaintTypeName = complaintTypeName;
  95. // }
  96. // }
  97. //
  98. //
  99. //
  100. //
  101. //
  102. // public List<String> asList(String pending, String completed,String forwarded,String reopened) {
  103. // // TODO Auto-generated method stub
  104. // return null;
  105. // }
  106. //}