Examples of Male


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

        List<String> annTags = new ArrayList<String>();
        annTags.add( "Conservative" );
        annTags.add( "Pretty" );
        annDoe.tags().set( annTags );

        Male joeDoe = uow.newEntity( MaleEntity.class );
        setName( joeDoe, "Joe Doe" );
        joeDoe.placeOfBirth().set( kualaLumpur );
        joeDoe.yearOfBirth().set( 1990 );
        joeDoe.mother().set( annDoe );
        joeDoe.pastGirlFriends().add( 0, annDoe );
        joeDoe.interests().add( 0, programming );
        joeDoe.interests().add( 0, gaming );
        joeDoe.email().set( "joe@thedoes.net" );
        List<String> joeTags = new ArrayList<String>();
        joeTags.add( "Cool" );
        joeTags.add( "Hunk" );
        joeTags.add( "Awesome" );
        joeDoe.tags().set( joeTags );

        Male jackDoe = uow.newEntity( MaleEntity.class );
        setName( jackDoe, "Jack Doe" );
        jackDoe.placeOfBirth().set( penang );
        jackDoe.yearOfBirth().set( 1970 );
        jackDoe.interests().add( 0, cars );
        jackDoe.wife().set( annDoe );
        List<String> jackTags = new ArrayList<String>();
        jackTags.add( "Conservative" );
        jackTags.add( "Awesome" );
        jackDoe.tags().set( jackTags );

        ValueBuilder<ContactsValue> builder = vbf.newValueBuilder( ContactsValue.class );
        ValueBuilder<ContactValue> contactBuilder = vbf.newValueBuilder( ContactValue.class );
        contactBuilder.prototype().email().set( "jackdoe@someplace.com" );
        contactBuilder.prototype().phone().set( "555-1234" );
        builder.prototype().contacts().get().add( contactBuilder.newInstance() );
        jackDoe.contacts().set( builder.newInstance() );

        annDoe.husband().set( jackDoe );

        PetEntity rex = uow.newEntity( PetEntity.class );
        setName( rex, "Rex" );
View Full Code Here

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

    @Test
    public void givenIsNotNullOnMixinTypeWhenExecutedThenReturnCorrect()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
        Male person = templateFor( Male.class );
        Query<Person> query = qb.where(
            isNotNull( person.wife() )
        ).newQuery( Network.persons() );
        verifyUnorderedResults( query, "Jack Doe" );
    }
View Full Code Here

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

    @Test
    public void givenIsNullOnMixinTypeWhenExecutedThenReturnCorrect()
        throws EntityFinderException
    {
        QueryBuilder<Male> qb = qbf.newQueryBuilder( Male.class );
        Male person = templateFor( Male.class );
        Query<Male> query = qb.where(
            isNull( person.wife() )
        ).newQuery( Network.males() );
        verifyUnorderedResults( query, "Joe Doe" );
    }
View Full Code Here

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

    @Test
    public void givenIsNullOnAssociationWhenExecutedThenReturnCorrect()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = qbf.newQueryBuilder( Person.class );
        Male person = templateFor( Male.class );
        Query<Person> query = qb.where(
            isNull( person.wife() )
        ).newQuery( Network.persons() );
        verifyUnorderedResults( query, "Joe Doe", "Ann Doe", "Vivian Smith" );
    }
View Full Code Here

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

    @Test
    public void script13()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
        Male person = templateFor( Male.class );
        Query<Person> query = unitOfWork.newQuery( qb.where( isNotNull( person.wife() ) ) );
        System.out.println( "*** script13: " + query );
        verifyUnorderedResults( query, "Jack Doe" );
    }
View Full Code Here

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

    @Test
    public void script13()
        throws EntityFinderException
    {
        Male person = templateFor( Male.class );
        // should return Jack Doe
        Iterable<EntityReference> entities = entityFinder.findEntities(
            Person.class,
            isNotNull( person.wife() ),
            NO_SORTING,
            NO_FIRST_RESULT, NO_MAX_RESULTS,
            NO_VARIABLES );
        assertNames( entities, JACK );
    }
View Full Code Here

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

    @Test
    public void script14()
        throws EntityFinderException
    {
        Male person = templateFor( Male.class );
        // should return Joe Doe
        Iterable<EntityReference> entities = entityFinder.findEntities(
            Male.class,
            isNull( person.wife() ),
            NO_SORTING,
            NO_FIRST_RESULT, NO_MAX_RESULTS,
            NO_VARIABLES );
        assertNames( entities, JOE );
    }
View Full Code Here

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

    @Test
    public void script15()
        throws EntityFinderException
    {
        Male person = templateFor( Male.class );
        // should return Ann and Joe Doe
        Iterable<EntityReference> entities = entityFinder.findEntities(
            Person.class,
            isNull( person.wife() ),
            NO_SORTING,
            NO_FIRST_RESULT, NO_MAX_RESULTS,
            NO_VARIABLES );
        assertNames( entities, ANN, JOE );
    }
View Full Code Here

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

    @Test
    public void script14()
        throws EntityFinderException
    {
        QueryBuilder<Male> qb = this.module.newQueryBuilder( Male.class );
        Male person = templateFor( Male.class );
        Query<Male> query = unitOfWork.newQuery( qb.where( isNull( person.wife() ) ) );
        System.out.println( "*** script14: " + query );
        verifyUnorderedResults( query, "Joe Doe" );
    }
View Full Code Here

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

    @Test
    public void script15()
        throws EntityFinderException
    {
        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
        Male person = templateFor( Male.class );
        Query<Person> query = unitOfWork.newQuery( qb.where( isNull( person.wife() ) ) );
        System.out.println( "*** script15: " + query );
        verifyUnorderedResults( query, "Joe Doe", "Ann Doe" );
    }
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.