Package org.qi4j.sample.dcicargo.sample_b.communication.query.dto

Examples of org.qi4j.sample.dcicargo.sample_b.communication.query.dto.CargoDTO.origin()


            protected void populateItem( ListItem<CargoDTO> item )
            {
                // Cargo
                CargoDTO cargo = item.getModelObject();
                String trackingId = cargo.trackingId().get().id().get();
                String origin = cargo.origin().get().getCode();

                // Route specification
                RouteSpecification routeSpec = cargo.routeSpecification().get();
                String destination = routeSpec.destination().get().getCode();
                Date deadline = routeSpec.arrivalDeadline().get();
View Full Code Here


        Delivery delivery = cargo.delivery().get();
        TransportStatus transportStatus = delivery.transportStatus().get();
        RouteSpecification routeSpecification = cargo.routeSpecification().get();
        final RoutingStatus routingStatus = delivery.routingStatus().get();
        boolean isMisrouted = routingStatus == MISROUTED;
        boolean isReRouted = !cargo.origin().get().getCode().equals( routeSpecification.origin().get().getCode() );

        add( new PrevNext( "prevNext", CargoDetailsPage.class, trackingId ) );

        add( new Label( "trackingId", trackingId ) );
View Full Code Here

        // Show both cargo origin and new route spec origin when re-routed during transport
        if( isReRouted )
        {
            Fragment originFragment = new Fragment( "origin", "re-routed-originFragment", this );
            originFragment.add( new Label( "cargoOrigin", cargo.origin().get().getString() ) );
            originFragment.add( new Label( "routeOrigin", routeSpecification.origin()
                .get()
                .getString() ).add( new CorrectColor( isMisrouted ) ) );
            add( originFragment );
        }
View Full Code Here

            add( originFragment );
        }
        else
        {
            Fragment originFragment = new Fragment( "origin", "originFragment", this );
            originFragment.add( new Label( "cargoOrigin", cargo.origin().get().getString() ) );
            add( originFragment );
        }

        add( new Label( "departure", Model.of( routeSpecification.earliestDeparture().get() ) ) );
        add( new Label( "destination", routeSpecification.destination()
View Full Code Here

                    map.put( "location", lastEvent.location().get().getString() );
                }
                else
                {
                    map.put( "voyage", "UNKNOWN_VOYAGE" );
                    map.put( "location", cargo.origin().get().getString() );
                }
                add( new Label( "transportStatus", new StringResourceModel(
                    "transportStatus.${status}", this, new Model<ValueMap>( map ) ) ) );

                // ETA ----------------------------------------------------------------------
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.