TransPort_Tracking
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bestray.transtracking.dao.mapper;
import com.bestray.trastrack.domain.LoanReceiving;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
/**
*
* @author user3
*/
public class ReceivedLoanResultSetExtractor implements ResultSetExtractor<Object>{
public Object extractData(ResultSet rs) throws SQLException, DataAccessException {
List <LoanReceiving> collections = new ArrayList<LoanReceiving>();
while (rs.next()) {
LoanReceiving received = new LoanReceiving();
received.setId(rs.getLong("id"));
received.setLoanReceivedVoucherNumber(rs.getLong("loan_received_voucher_number"));
received.setLoanAmount(rs.getDouble("loan_amount"));
received.setLoanReceivedDate(rs.getDate("loan_received_date"));
received.setLoanReceivedFromId(rs.getLong("loan_received_from_id"));
received.setLoanReceivedBy(rs.getLong("loan_received_by"));
received.setLoanReceivedMode(rs.getLong("loan_received_Mode"));
received.setLoanReceivedModeDepositedAt(rs.getString("loan_received_mode_deposited_at"));
received.setLoanReceivedModeChequeNumber(rs.getString("loan_received_mode_cheque_number"));
received.setLoanVoucherDetails(rs.getString("Loan_Voucher_details"));
received.setReceivedFromType(rs.getString("received_from_type"));
collections.add(received);
}
return collections;
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Sat 28 Jul, 2018 05:29:14 +0000 |
|