Examples of trackingId()


Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.trackingId()

        {
            @Override
            protected void populateItem( ListItem<CargoDTO> item )
            {
                CargoDTO cargo = item.getModelObject();
                String trackingId = cargo.trackingId().get().id().get();
                Delivery delivery = cargo.delivery().get();
                RoutingStatus routingStatus = cargo.delivery().get().routingStatus().get();

                item.add( new LinkPanel( "trackingId", CargoDetailsPage.class, trackingId ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.trackingId()

                // Deviation 3b
                try
                {
                    // Will throw NoSuchEntityException if not found in store
                    Cargo cargo = uow.get( Cargo.class, context.trackingIdString );
                    trackingId = cargo.trackingId().get();

                    // Deviation 3c
                    if( cargo.itinerary().get() == null )
                    {
                        throw new IllegalArgumentException( "Can't create handling event for non-routed cargo '"
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.trackingId()

        // Retrieve created cargo from store
        Cargo cargo = uow.get( Cargo.class, trackingId.id().get() );

        // Test cargo data
        assertThat( cargo.trackingId().get(), is( equalTo( trackingId ) ) );
        assertThat( cargo.origin().get(), is( equalTo( HONGKONG ) ) );

        // Test route specification
        assertThat( cargo.routeSpecification().get().destination().get(), is( equalTo( STOCKHOLM ) ) );
        // day(17) here is calculated a few milliseconds after initial day(17), so it will be later...
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.trackingId()

                Delivery delivery = new BuildDeliverySnapshot( routeSpec ).get();

                // Create cargo
                Cargo cargo = cargos.createCargo( routeSpec, delivery, trackingIdString );

                return cargo.trackingId().get();
            }
        }
    }

    @Mixins( RoutingFacadeRole.Mixin.class )
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.trackingId()

        Cargo cargoEntity = templateFor( CargoEntity.class );

        QueryBuilder<CargoEntity> qb = qbf.newQueryBuilder( CargoEntity.class )
            .where( isNotNull( cargoEntity.itinerary() ) );
        Query<CargoEntity> cargos = uowf.currentUnitOfWork().newQuery( qb )
            .orderBy( orderBy( cargoEntity.trackingId().get().id() ) );

        List<String> cargoList = new ArrayList<String>();
        for( CargoEntity cargo : cargos )
        {
            cargoList.add( cargo.trackingId().get().id().get() );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.handling.HandlingEvent.trackingId()

            public Query<HandlingEventEntity> getQuery()
            {
                HandlingEvent eventTemplate = templateFor( HandlingEvent.class );

                QueryBuilder<HandlingEventEntity> qb = qbf.newQueryBuilder( HandlingEventEntity.class )
                    .where( QueryExpressions.eq( eventTemplate.trackingId().get().id(), trackingIdString ) );
                return uowf.currentUnitOfWork().newQuery( qb )
                    .orderBy( orderBy( eventTemplate.completionTime() ) );
            }
        };
    }
View Full Code Here

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

            @Override
            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();
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.cargo.Cargo.trackingId()

        Cargo cargoEntity = templateFor( CargoEntity.class );

        QueryBuilder<CargoEntity> qb = qbf.newQueryBuilder( CargoEntity.class )
            .where( isNotNull( cargoEntity.itinerary() ) );
        Query<CargoEntity> cargos = uowf.currentUnitOfWork().newQuery( qb )
            .orderBy( orderBy( cargoEntity.trackingId().get().id() ) );

        List<String> cargoList = new ArrayList<String>();
        for( CargoEntity cargo : cargos )
        {
            cargoList.add( cargo.trackingId().get().id().get() );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.cargo.Cargo.trackingId()

                nextEvent.prototype().location().set( routeSpec.origin().get() );
                delivery.prototype().nextHandlingEvent().set( nextEvent.newInstance() );

                Cargo cargo = cargoFactory.createCargo( routeSpec, delivery.newInstance(), trackingIdString );

                return cargo.trackingId().get();
            }
        }
    }
}
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.data.structure.handling.HandlingEvent.trackingId()

            public Query<HandlingEventEntity> getQuery()
            {
                HandlingEvent eventTemplate = templateFor( HandlingEvent.class );

                QueryBuilder<HandlingEventEntity> qb = qbf.newQueryBuilder( HandlingEventEntity.class )
                    .where( QueryExpressions.eq( eventTemplate.trackingId().get().id(), trackingIdString ) );
                return uowf.currentUnitOfWork().newQuery( qb )
                    .orderBy( orderBy( eventTemplate.completionTime() ) );
            }
        };
    }
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.