Package org.qi4j.api.unitofwork

Examples of org.qi4j.api.unitofwork.UnitOfWork.metaInfo()


        final UnitOfWork unitOfWork = uowf.currentUnitOfWork();

        ApplicationEvent event = next.createEvent( name, args );

        // Add event to list in UoW
        UnitOfWorkApplicationEvents events = unitOfWork.metaInfo( UnitOfWorkApplicationEvents.class );
        if( events == null )
        {
            events = new UnitOfWorkApplicationEvents();
            unitOfWork.setMetaInfo( events );
View Full Code Here


                @Override
                public void afterCompletion( UnitOfWorkStatus status )
                {
                    if( status.equals( UnitOfWorkStatus.COMPLETED ) )
                    {
                        UnitOfWorkApplicationEvents events = unitOfWork.metaInfo( UnitOfWorkApplicationEvents.class );

                        try
                        {
                            eventStore.storeEvents( events.getEvents() );
                        }
View Full Code Here

        final UnitOfWork unitOfWork = uowf.currentUnitOfWork();

        DomainEventValue eventValue = next.createEvent( api.dereference( entity ), name, args );

        // Add eventValue to list in UoW
        UnitOfWorkEvents events = unitOfWork.metaInfo(UnitOfWorkEvents.class );
        if (events == null)
        {
            events = new UnitOfWorkEvents();
            unitOfWork.setMetaInfo( events );
View Full Code Here

                @Override
                public void afterCompletion( UnitOfWorkStatus status )
                {
                    if (status.equals( UnitOfWorkStatus.COMPLETED ))
                    {
                        UnitOfWorkEvents events = unitOfWork.metaInfo( UnitOfWorkEvents.class );

                        ValueBuilder<UnitOfWorkDomainEventsValue> builder = vbf.newValueBuilder( UnitOfWorkDomainEventsValue.class );
                        builder.prototype().user().set( user );
                        builder.prototype().timestamp().set( System.currentTimeMillis() );
                        builder.prototype().usecase().set( unitOfWork.usecase().name() );
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.