Examples of PrimitiveDomain


Examples of org.objectquery.generic.domain.PrimitiveDomain

  @Test
  public void testPrimitiveType() {
    MockQueryBuilder qb = new MockQueryBuilder();
    BaseSelectQuery<PrimitiveDomain> query = new GenericSelectQuery<PrimitiveDomain, Object>(qb, PrimitiveDomain.class);
    PrimitiveDomain pd = query.target();
    query.eq(query.box(pd.isBool()), false);
    query.eq(query.box(pd.getInte()), 0);
    query.eq(query.box(pd.getLonge()), 0L);
    query.eq(query.box(pd.getBytee()), (byte) 0);
    query.eq(query.box(pd.getChare()), 'A');
    query.eq(query.box(pd.getDoublee()), 0D);
    query.eq(query.box(pd.getFloate()), 0F);
    query.eq(query.box(pd.getShorte()), (short) 0);

    qb.build();

    assertEquals(" wrong number of condition", qb.getConditionsString().size(), 8);
    assertEquals("bool EQUALS false", qb.getConditionsString().get(0));
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.