Package org.qi4j.runtime.query.model

Examples of org.qi4j.runtime.query.model.Domain


        males = new ArrayList<Male>();
        females = new ArrayList<Female>();
        pets = new ArrayList<PetEntity>();
        nameables = new ArrayList<Nameable>();

        Domain gaming = uow.newEntity( Domain.class );
        setName( gaming, "Gaming" );
        gaming.description().set( "Gaming domain" );

        Domain programming = uow.newEntity( Domain.class );
        setName( programming, "Programming" );
        programming.description().set( "Programing domain" );

        Domain cooking = uow.newEntity( Domain.class );
        setName( cooking, "Cooking" );
        cooking.description().set( "Cooking domain" );

        Domain cars = uow.newEntity( Domain.class );
        setName( cars, "Cars" );
        cars.description().set( "Cars" );

        City kualaLumpur = uow.newEntity( City.class, "kualalumpur" );
        setName( kualaLumpur, "Kuala Lumpur" );
        kualaLumpur.country().set( "Malaysia" );
        kualaLumpur.county().set( "Some Jaya" );
View Full Code Here


    public void givenOneOfQueryWhenExecutedThenReturnCorrect()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
        Person person = templateFor( Person.class );
        Domain interests = person.interests().get( 0 );
        Query<Person> query = qb.where( eq( interests.name(), "Cars" ) ).newQuery( Network.persons() );
        verifyOrderedResults( query, "Jack Doe" );
    }
View Full Code Here

    public void givenManyAssociationContainsQueryWhenExecutedThenReturnCorrect()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
        Person person = templateFor( Person.class );
        Domain value = Network.domains().iterator().next();
        Query<Person> query = qb.where( QueryExpressions.contains( person.interests(), value ) )
            .newQuery( Network.persons() );
        for( Person person1 : query )
        {
            System.out.println( person1.name() );
View Full Code Here

TOP

Related Classes of org.qi4j.runtime.query.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.