Package org.qi4j.sample.dcicargo.sample_b.data.structure.tracking

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.tracking.TrackingId


                protected void onSubmit( AjaxRequestTarget target, Form<?> form )
                {
                    try
                    {
                        // Perform use case
                        TrackingId trackingId = new BookNewCargo( origin, destination, deadline ).getTrackingId();

                        // Add new tracking id to list in session
                        PrevNext.addId( Session.get(), trackingId.id().get() );

                        // Show created cargo
                        setResponsePage( CargoDetailsPage.class, new PageParameters().set( 0, trackingId.id().get() ) );
                    }
                    catch( Exception e )
                    {
                        logger.warn( "Problem booking a new cargo: " + e.getMessage() );
                        feedback.error( e.getMessage() );
View Full Code Here


            public HandlingEvent registerAndGetHandlingEvent()
                throws CannotRegisterHandlingEventException
            {
                UnitOfWork uow = uowf.currentUnitOfWork();
                TrackingId trackingId;
                Location location;
                Voyage voyage = null;

                // Step 1 - Find Cargo from tracking id string
                try
View Full Code Here

        ValueBuilderFactory vbf;

        public Cargo createCargo( RouteSpecification routeSpecification, Delivery delivery, String id )
            throws ConstraintViolationException, CannotCreateCargoException
        {
            TrackingId trackingId = buildTrackingId( id );

            UnitOfWork uow = uowf.currentUnitOfWork();
            EntityBuilder<Cargo> cargoBuilder = uow.newEntityBuilder( Cargo.class, trackingId.id().get() );
            cargoBuilder.instance().trackingId().set( trackingId );
            cargoBuilder.instance().origin().set( routeSpecification.origin().get() );
            cargoBuilder.instance().routeSpecification().set( routeSpecification );
            cargoBuilder.instance().delivery().set( delivery );
View Full Code Here

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_b.data.structure.tracking.TrackingId

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.