Package org.qi4j.sample.dcicargo.sample_a.data.shipping.voyage

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.voyage.Voyage


            id = registeredHandlingEvent.trackingId().get().id().get();
            time = parseDate( registeredHandlingEvent.completionTime().get() );
            type = registeredHandlingEvent.handlingEventType().get().name();
            unloc = registeredHandlingEvent.location().get().getCode();
            loc = registeredHandlingEvent.location().get().name().get();
            Voyage voy = registeredHandlingEvent.voyage().get();
            voyage = voy != null ? ", voyage " + voy.voyageNumber().get().number().get() : "";

            logger.info( "  Cargo '" + id + "' was handled " + time
                         + " (" + type + " in " + loc + "/" + unloc + voyage + ")." );
        }
View Full Code Here


        Location HONGKONG = uow.get( Location.class, CNHKG.code().get() );
        SHANGHAI = uow.get( Location.class, CNSHA.code().get() );
        STOCKHOLM = uow.get( Location.class, SESTO.code().get() );
        Location NEWYORK = uow.get( Location.class, USNYC.code().get() );
        DALLAS = uow.get( Location.class, USDAL.code().get() );
        Voyage V100S = uow.get( Voyage.class, "V100S" );
        V200T = uow.get( Voyage.class, "V200T" );
        V300A = uow.get( Voyage.class, "V300A" );

        // Create cargo
        trackingId = new BookNewCargo( CARGOS, HONGKONG, STOCKHOLM, day( 17 ) ).createCargo( "ABC" );
View Full Code Here

                Location CHICAGO = location( USCHI, "Chicago" );
                Location DALLAS = location( USDAL, "Dallas" );
                Location NEWYORK = location( USNYC, "New York" );

              // Voyage entity objects
                Voyage V100S = voyage( "V100S", schedule(
                  carrierMovement( NEWYORK, CHICAGO, day( 1 ), day( 2 ) ),
                  carrierMovement( CHICAGO, DALLAS, day( 8 ), day( 9 ) )
              ) );
                Voyage V200T = voyage( "V200T", schedule(
                  carrierMovement( NEWYORK, CHICAGO, day( 7 ), day( 8 ) ),
                  carrierMovement( CHICAGO, DALLAS, day( 8 ), day( 9 ) )
              ) );
                Voyage V300A = voyage( "V300A", schedule(
                  carrierMovement( DALLAS, HAMBURG, day( 10 ), day( 14 ) ),
                  carrierMovement( HAMBURG, STOCKHOLM, day( 15 ), day( 16 ) ),
                  carrierMovement( STOCKHOLM, HELSINKI, day( 17 ), day( 18 ) )
              ) );
                Voyage V400S = voyage( "V400S", schedule(
                  carrierMovement( TOKYO, ROTTERDAM, day( 9 ), day( 15 ) ),
                  carrierMovement( ROTTERDAM, HAMBURG, day( 15 ), day( 16 ) ),
                  carrierMovement( HAMBURG, MELBOURNE, day( 17 ), day( 26 ) ),
                  carrierMovement( MELBOURNE, TOKYO, day( 27 ), day( 33 ) )
              ) );
                Voyage V500S = voyage( "V500S", schedule(
                  carrierMovement( HAMBURG, STOCKHOLM, day( 17 ), day( 19 ) ),
                  carrierMovement( STOCKHOLM, HELSINKI, day( 20 ), day( 21 ) )
              ) );

              // Cargo and HandlingEvent factories
View Full Code Here

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_a.data.shipping.voyage.Voyage

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.