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

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


    public InspectCargoDeliveryStatus( HandlingEvent handlingEvent )
    {
        this.handlingEvent = handlingEvent;

        Cargo cargo = loadEntity( Cargo.class, handlingEvent.trackingId().get().id().get() );
        deliveryInspector = rolePlayer( DeliveryInspectorRole.class, cargo );

        handlingLocation = handlingEvent.location().get();
        destination = cargo.routeSpecification().get().destination().get();
    }
View Full Code Here


*/
public class TrackingQueries extends Queries
{
    public List<String> routedCargos()
    {
        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

        RoutingService routingService;

        public List<IModel<Itinerary>> routeCandidates( final String trackingIdString )
            throws FoundNoRoutesException
        {
            Cargo cargo = uowf.currentUnitOfWork().get( Cargo.class, trackingIdString );
            RouteSpecification routeSpec = cargo.routeSpecification().get();

            return routeCandidates( routeSpec );
        }
View Full Code Here

                ValueBuilder<NextHandlingEvent> nextEvent = vbf.newValueBuilder( NextHandlingEvent.class );
                nextEvent.prototype().handlingEventType().set( RECEIVE );
                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

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_b.data.structure.cargo.Cargo

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.