Package com.wordpress.salaboy.model

Examples of com.wordpress.salaboy.model.Emergency


    public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
    }

    @Override
    public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
        Emergency emergency = (Emergency) workItem.getParameter("emergency");
        List<Vehicle> vehicles = (List<Vehicle>) workItem.getParameter("emergency.vehicles");
        System.out.println("Procedure Report:");
        if (emergency != null && vehicles != null) {
            for (Vehicle vehicle : vehicles) {
                System.out.println("\tUpdates for vehicle: " + vehicle.getId());
                List<VehicleUpdate> updates = emergency.getUpdatesForVehicle(vehicle.getId());
                if (updates != null) {
                    for (VehicleUpdate vehicleUpdate : updates) {
                        System.out.println("\t\t"+vehicleUpdate);
                    }
                }
View Full Code Here


    private FirefightersDepartment firefightersDepartment = null;

    @Before
    public void setUp() throws Exception {

        emergency = new Emergency();
        emergency.setId("Emergency1");
        fireTruck = new FireTruck();
        fireTruck.setId("FireTruck1");

        call = new Call(1, 2, new Date());
View Full Code Here

    public void defaultAdHocSimpleTest() throws InterruptedException, ClassNotFoundException, IOException {
        //String emergencyId = trackingService.newEmergencyId();
        call = new Call(1, 2, new Date());
        persistenceService.storeCall(call);
       
        emergency = new Emergency();
        emergency.setCall(call);
        emergency.setLocation(new Location(1, 2));
        emergency.setType(Emergency.EmergencyType.HEART_ATTACK);
        emergency.setNroOfPeople(1);
View Full Code Here

    public void defaultAdHocPlusTrackingTest() throws InterruptedException, ClassNotFoundException, IOException {
       
        call = new Call(1, 2, new Date());
        persistenceService.storeCall(call);
       
        emergency = new Emergency();
        emergency.setCall(call);
        emergency.setLocation(new Location(1, 2));
        emergency.setType(Emergency.EmergencyType.HEART_ATTACK);
        emergency.setNroOfPeople(1);
        persistenceService.storeEmergency(emergency);
View Full Code Here

        Map<String, Object> deserializedContent = (Map<String, Object>) ois.readObject();
        Call retrivedCall = (Call) deserializedContent.get("call");


        //I shoudl call the tracking component here and register the new emerency
        Emergency emergency = new Emergency();
        // String emergencyId = ContextTrackingServiceImpl.getInstance().newEmergencyId();
        // emergency.setId(emergencyId);
        emergency.setCall(retrivedCall);
        emergency.setLocation(new Location(1, 2));
        emergency.setType(Emergency.EmergencyType.HEART_ATTACK);
        emergency.setNroOfPeople(1);


        Map<String, Object> info = new HashMap<String, Object>();
        info.put("emergency", emergency);
View Full Code Here

        System.out.println(">>>>  Emergencies Count in the DASHBOARD:"+emergencies.size());
        Object[][] emergenciesArray = new Object[emergencies.size()][4];
        Iterator<Emergency> it = emergencies.iterator();
        int i = 0;
        while(it.hasNext()){
            Emergency emergency = it.next();
            emergenciesArray[i][0] = emergency.getId();
            emergenciesArray[i][1] = emergency.getCall().getId();
            emergenciesArray[i][2] = emergency.getType().toString();
            emergenciesArray[i][3] = emergency.getNroOfPeople();
            i++;
        }
        emergenciesjTable.setModel(new javax.swing.table.DefaultTableModel(
            emergenciesArray,
            new String [] {
View Full Code Here

            Collection<Emergency> emergencies = (Collection<Emergency>) persistenceService.getAllEmergencies();
            Object[][] emergenciesArray = new Object[emergencies.size()][4];
            Iterator<Emergency> it = emergencies.iterator();
            int i = 0;
            while (it.hasNext()) {
                Emergency emergency = it.next();
                System.out.println("Emergency -> " + emergency);
                emergenciesArray[i][0] = emergency.getId();
                emergenciesArray[i][1] = emergency.getCall().getId();
                emergenciesArray[i][2] = emergency.getType().toString();
                emergenciesArray[i][3] = emergency.getNroOfPeople();
                i++;
            }
            emergenciesjTable.setModel(new javax.swing.table.DefaultTableModel(
                    emergenciesArray,
                    new String[]{
View Full Code Here

TOP

Related Classes of com.wordpress.salaboy.model.Emergency

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.