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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
package com.bestray.transtracking.controller;

import com.bestray.transtracking.service.CodeService;
import com.bestray.transtracking.service.CountyService;
import com.bestray.transtracking.service.EmployeeService;
import com.bestray.transtracking.service.impl.CodeServiceImpl;
import com.bestray.transtracking.service.impl.CountyServiceImpl;
import com.bestray.transtracking.service.impl.EmployeeServiceImpl;
import com.bestray.transtracking.views.EmployeeMasterView;
import com.bestray.trastrack.domain.Code;
import com.bestray.trastrack.domain.Country;
import com.bestray.trastrack.domain.Employee;
import com.bestray.trastrack.domain.State;
import java.util.List;
import java.util.Vector;
import com.bestray.transtracking.exceptions.TransTrackException;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Sumit
 */
public class EmployeeMasterController {
    
     private EmployeeMasterView EmployeeMasterView;
     private EmployeeService employeeService;
     public static final String EMP_CATAGORY = "EMP_CATAGORY";
     private CodeService codeService;
     private CountyService countyService;

    public EmployeeMasterController() {
        
         //EmployeeMasterView = new EmployeeMasterView();
         employeeService = new EmployeeServiceImpl();
         countyService = new CountyServiceImpl();
         codeService = new CodeServiceImpl();
        
    }
 
   
    public boolean  AddNewEmployee(Employee employee){
       return employeeService.NewEmployee(employee);
        
        
    }
    
    public Vector<Country> getCountyList() {
        Vector countries = new Vector();
        List<Country> countyList = countyService.getCountyList();
        for(Country country:countyList){
            countries.addElement(country);
        }
        return countries;
    }
    
     public Vector<State> getStateList() {
        //Vector states = new Vector();
         Vector<State> states = new Vector<State>();
        List<State> stateList = countyService.getStateList();
        for(State state:stateList){
            states.addElement(state);
        }
        return states;
    }
    
    public Vector<Code> getCodeList() {
        Vector codes = new Vector();
        
        List<Code> codeList = codeService.getCodesByCodeTypeName(EMP_CATAGORY);
        for(Code code:codeList){
            codes.addElement(code);
        }
        return codes;
    }
    
    public Vector<Vector<String>> getEmployeeList(){
         return employeeService.getEmplyoeeList();        
     }
    
     public Employee getEmployeeRegistrationDetails(Long valueOf) {
        return employeeService.getEmployeeRegistrationDetails(valueOf);
    }
     
    public void deleteEmployee(Long employeeId)throws TransTrackException {
        employeeService.deleteEmployee(employeeId);
    }
    
     public Vector<Vector<String>> getAllEmployeeList() throws  TransTrackException{
         return employeeService.findAllEmployeesList();        
     }
    
}

Commits for TransPort_Tracking/TransPortTracking/src/main/java/com/bestray/transtracking/controller/EmployeeMasterController.java

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