Package org.switchyard.quickstarts.camel.sap.binding.bean

Examples of org.switchyard.quickstarts.camel.sap.binding.bean.SeatAvailibility


        List<SeatAvailibility> seatAvailiblityList = new ArrayList<SeatAvailibility>();

        for (Structure availibility : availibilityList) {

            // Create seat availability object.
            SeatAvailibility seatAvailiblity = new SeatAvailibility();

            // Add hop number to availability if set.
            String hopNumber = availibility.get("HOP", String.class);
            if (hopNumber != null) {
                seatAvailiblity.setHopNumber(hopNumber);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set hop number = '{}' in seat availibility", hopNumber);
                }
            }

            // Add economy class seat capacity to availability if set.
            Integer economyClassSeatCapacity =  availibility.get("ECONOMAX", Integer.class);
            if (economyClassSeatCapacity != null) {
                seatAvailiblity.setEconomyClassSeatCapacity(economyClassSeatCapacity.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set economy class seat capacity = '{}' in seat availibility", economyClassSeatCapacity);
                }
            }

            // Add economy class free seats to availability if set.
            Integer economyClassFreeSeats =  availibility.get("ECONOFREE", Integer.class);
            if (economyClassFreeSeats != null) {
                seatAvailiblity.setEconomyClassFreeSeats(economyClassFreeSeats.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set economy class free seats = '{}' in seat availibility", economyClassFreeSeats);
                }
            }

            // Add business class seat capacity to availability if set.
            Integer businessClassSeatCapacity =  availibility.get("BUSINMAX", Integer.class);
            if (businessClassSeatCapacity != null) {
                seatAvailiblity.setBusinessClassSeatCapacity(businessClassSeatCapacity.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set business class seat capacity = '{}' in seat availibility", businessClassSeatCapacity);
                }
            }

            // Add business class free seats to availability if set.
            Integer businessClassFreeSeats =  availibility.get("BUSINFREE", Integer.class);
            if (businessClassFreeSeats != null) {
                seatAvailiblity.setBusinessClassFreeSeats(businessClassFreeSeats.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set business class free seats = '{}' in seat availibility", businessClassFreeSeats);
                }
            }

            // Add first class seat capacity to availability if set.
            Integer firstClassClassSeatCapacity =  availibility.get("FIRSTMAX", Integer.class);
            if (firstClassClassSeatCapacity != null) {
                seatAvailiblity.setFirstClassClassSeatCapacity(firstClassClassSeatCapacity.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set first class seat capacity = '{}' in seat availibility", firstClassClassSeatCapacity);
                }
            }

            // Add first class free seats to availability if set.
            Integer firstClassFreeSeats =  availibility.get("FIRSTFREE", Integer.class);
            if (firstClassFreeSeats != null) {
                seatAvailiblity.setFirstClassFreeSeats(firstClassFreeSeats.toString());
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Set first class free seats = '{}' in seat availibility", firstClassFreeSeats);
                }
            }
View Full Code Here

TOP

Related Classes of org.switchyard.quickstarts.camel.sap.binding.bean.SeatAvailibility

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.