Package org.qi4j.api.unitofwork

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


        // Find it
        uow = assembler.module().newUnitOfWork();
        try
        {
            Data data = uow.newQuery( assembler.module()
                                          .newQueryBuilder( Data.class )
                                          .where( eq( templateFor( Data.class ).foo(), "FooFoo" ) ) ).find();
            Assert.assertEquals( "FooFoo", data.foo().get() );
        }
        finally
View Full Code Here


        @Override
        public Lead findByFixedQuery( String queryString )
        {
            UnitOfWork uow = module.currentUnitOfWork();
            Query<Lead> query = uow.newQuery( module.newQueryBuilder( Lead.class ).where( SesameExpressions.sparql( queryString ) ) );
            return query.find();
        }

        @Override
        public Lead findByName( String name )
View Full Code Here

        {
            UnitOfWork uow = module.currentUnitOfWork();
            QueryBuilder<Lead> builder = module.newQueryBuilder( Lead.class );
            Lead template = templateFor( Lead.class );

            Query<Lead> query = uow.newQuery( builder.where( eq( template.name(), name ) ) );
            return query.find();
        }
    }

}
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.