Package org.qi4j.spi.entitystore

Examples of org.qi4j.spi.entitystore.EntityStore


        if( identity == null )
        {
            identity = model.module().identityGenerator().generate( model.model().type() );
        }

        EntityStore entityStore = model.module().entityStore();

        EntityState entityState = model.model().newEntityState( uow.getEntityStoreUnitOfWork( entityStore, module() ),
                                                              parseEntityReference( identity ) );

        // Init state
View Full Code Here


        if( model == null )
        {
            throw new EntityTypeNotFoundException( type.getName() );
        }

        EntityStore entityStore = model.module().entityStore();

        // Generate id if necessary
        if( identity == null )
        {
            IdentityGenerator idGen = model.module().identityGenerator();
View Full Code Here

            EntityModel model = null;
            ModuleInstance module = null;
            // Figure out what EntityStore to use
            for( ModelModule<EntityModel> potentialModel : potentialModels )
            {
                EntityStore store = potentialModel.module().entityStore();
                EntityStoreUnitOfWork storeUow = getEntityStoreUnitOfWork( store, potentialModel.module() );
                try
                {
                    entityState = storeUow.entityStateOf( identity );
                }
View Full Code Here

        if( model == null )
        {
            throw new EntityTypeNotFoundException( type.getName() );
        }

        EntityStore entityStore = model.module().entityStore();

        // Generate id if necessary
        if( identity == null )
        {
            IdentityGenerator idGen = model.module().identityGenerator();
View Full Code Here

//            Query<DebugRecord> query = builder.newQuery( uow );
//            assertEquals( 0, query.count() );
            Some service = (Some) module.findService( Some.class ).get();
            String message = service.doSomething( "World!", 10 );
            assertEquals( message, "Hello!" );
            EntityStore es = (EntityStore) module.findService( EntityStore.class ).get();
            final String[] result = new String[1];
            es.entityStates( module ).transferTo( Transforms.map( new Function<EntityState, EntityState>()
                    {
                        public EntityState map( EntityState entityState )
                        {
                            if( ServiceDebugRecordEntity.class.getName()
                                    .equals( first(entityState.entityDescriptor().types()).getName() ) )
View Full Code Here

TOP

Related Classes of org.qi4j.spi.entitystore.EntityStore

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.