Package org.qi4j.spi.entitystore

Examples of org.qi4j.spi.entitystore.BackupRestore.restore()


                    module.layer().application().setVersion( "1.1" );
                }
            };

            BackupRestore testData = v1_1.module().findService( BackupRestore.class ).get();
            data_v1.transferTo( testData.restore() );

            UnitOfWork uow = v1_1.module().newUnitOfWork();
            TestEntity1_1 entity = uow.get( TestEntity1_1.class, id );
            assertThat( "Property has been renamed", entity.newFoo().get(), CoreMatchers.equalTo( "Some value" ) );
            assertThat( "ManyAssociation has been renamed", entity.newFooManyAssoc().count(), CoreMatchers.equalTo( 1 ) );
View Full Code Here


            BackupRestore testData = v2_0.module().findService( BackupRestore.class ).get();

            // Test migration from 1.0 -> 2.0
            {
                data_v1.transferTo( testData.restore() );
                UnitOfWork uow = v2_0.module().newUnitOfWork();
                TestEntity2_0 entity = uow.get( TestEntity2_0.class, id );
                assertThat( "Property has been created", entity.bar().get(), CoreMatchers.equalTo( "Some value" ) );
                assertThat( "Custom Property has been created", entity.customBar().get(), CoreMatchers.equalTo( "Hello Some value" ) );
                assertThat( "ManyAssociation has been renamed", entity.newFooManyAssoc().count(), CoreMatchers.equalTo( 1 ) );
View Full Code Here

                    module.layer().application().setVersion( "3.0" );
                }
            };

            BackupRestore testData = v3_0.module().findService( BackupRestore.class ).get();
            data_v1_1.transferTo( testData.restore() );

            // Test migration from 1.0 -> 3.0
            {
                data_v1.transferTo( testData.restore() );
                UnitOfWork uow = v3_0.module().newUnitOfWork();
View Full Code Here

            BackupRestore testData = v3_0.module().findService( BackupRestore.class ).get();
            data_v1_1.transferTo( testData.restore() );

            // Test migration from 1.0 -> 3.0
            {
                data_v1.transferTo( testData.restore() );
                UnitOfWork uow = v3_0.module().newUnitOfWork();
                org.qi4j.migration.moved.TestEntity2_0 entity = uow.get( org.qi4j.migration.moved.TestEntity2_0.class, id );
                uow.complete();
            }
        }
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.