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
44
45
46
47
|
package com.bestray.transtracking.dao.mapper;
import com.bestray.trastrack.domain.Address;
import com.bestray.trastrack.domain.ClientUser;
import com.bestray.trastrack.domain.Country;
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;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author user3
*/
public class ClientResultSetExtractor implements ResultSetExtractor<Object>{
public Object extractData(ResultSet rs) throws SQLException,
DataAccessException{
List <ClientUser> clients = new ArrayList<ClientUser>();
while (rs.next()) {
ClientUser client = new ClientUser();
// Address address = new Address();
client.setId(rs.getLong("id"));
client.setClientname(rs.getString("name"));
client.setAddressid(rs.getLong("address_id"));
client.setClientcontact1(rs.getLong("contact_1"));
client.setClientcontact2(rs.getLong("contact_2"));
client.setClientcontact3(rs.getLong("contact_3"));
client.setOpeningbal(rs.getDouble("opening_balance"));
client.setOpeningbaltype(rs.getString("opening_balance_type"));
client.setLock(rs.getString("lock_ind"));
client.setEmail_id(rs.getString("email"));
clients.add(client);
}
return clients;
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Sat 28 Jul, 2018 05:29:14 +0000 |
|