Package org.qi4j.test.indexing.model

Examples of org.qi4j.test.indexing.model.Domain


    public void script23()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
        Person person = templateFor( Person.class );
        Domain interests = oneOf( person.interests() );
        Query<Person> query = unitOfWork.newQuery( qb.where( eq( interests.name(), "Cars" ) ) );
        System.out.println( "*** script23: " + query );
        verifyOrderedResults( query, "Jack Doe" );
    }
View Full Code Here


    @Test
    public void script33()
    {
        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
        Person person = templateFor( Person.class );
        Domain gaming = unitOfWork.get( Domain.class, "Gaming" );
        Query<Person> query = unitOfWork.newQuery( qb.where( contains( person.interests(), gaming ) ) );
        System.out.println( "*** script33: " + query );

        verifyUnorderedResults( query, "Joe Doe" );
    }
View Full Code Here

        throws UnitOfWorkCompletionException
    {
        try( UnitOfWork unitOfWork = module.newUnitOfWork() )
        {
            NameableAssert.clear();
            Domain gaming;
            {
                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class, "Gaming" );
                gaming = domainBuilder.instance();
                gaming.name().set( "Gaming" );
                gaming.description().set( "Gaming domain" );
                gaming = domainBuilder.newInstance();
                NameableAssert.trace( gaming );
            }

            Domain programming;
            {
                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class );
                programming = domainBuilder.instance();
                programming.name().set( "Programming" );
                programming.description().set( "Programing domain" );
                programming = domainBuilder.newInstance();
                NameableAssert.trace( programming );
            }

            Domain cooking;
            {
                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class );
                cooking = domainBuilder.instance();
                cooking.name().set( "Cooking" );
                cooking.description().set( "Cooking domain" );
                cooking = domainBuilder.newInstance();
                NameableAssert.trace( cooking );
            }

            Domain cars;
            {
                EntityBuilder<Domain> domainBuilder = unitOfWork.newEntityBuilder( Domain.class );
                cars = domainBuilder.instance();
                cars.name().set( "Cars" );
                cars.description().set( "Cars" );
                cars = domainBuilder.newInstance();
                NameableAssert.trace( cars );
            }

            City kualaLumpur;
View Full Code Here

TOP

Related Classes of org.qi4j.test.indexing.model.Domain

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.