Subversion Repository Public Repository

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
48
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bestray.transtracking.service.impl;

import com.bestray.transporttracking.DataSourceObject;
import com.bestray.transtracking.dao.CountryDao;
import com.bestray.transtracking.service.CountyService;
import com.bestray.trastrack.domain.Country;
import java.util.List;
import com.bestray.transtracking.dao.impl.CountryDaoImpl;
import com.bestray.transtracking.exceptions.TransTrackException;
import com.bestray.trastrack.domain.State;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Girija Sahu
 */
public class CountyServiceImpl implements CountyService {

    private CountryDao countryDao;

    public CountyServiceImpl() {
    }

    public List<Country> getCountyList() {
        try {
            countryDao = new CountryDaoImpl(DataSourceObject.getDataSourceObject());
            return countryDao.getCountyList();
        } catch (Exception ex) {
            Logger.getLogger(CountyServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
            throw new TransTrackException("Error in Fetching County Name List");
        }
    }

    public List<State> getStateList() {
        try {
            countryDao = new CountryDaoImpl(DataSourceObject.getDataSourceObject());
            return countryDao.getStateList();
        } catch (Exception ex) {
            Logger.getLogger(CountyServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
            throw new TransTrackException("Error in Fetching State List");
        }
    }
}

Commits for TransPort_Tracking/TransPortTracking/src/main/java/com/bestray/transtracking/service/impl/CountyServiceImpl.java

Diff revisions: vs.
Revision Author Commited Message
1 girijabapi picture girijabapi Sat 28 Jul, 2018 05:29:14 +0000