Package jodd.db.oom.tst

Examples of jodd.db.oom.tst.User


  }

  @Test
  public void testCustomName() {
    DbOomQuery dbOomQuery = sql("select $C{u.*} from $T{User u}").query();
    User user = dbOomQuery.find(User.class);

    assertEquals(1, user.userId);
    assertEquals("Gandalf", user.name);

    // select custom value into target entity
View Full Code Here


    DbOomQuery dbOomQuery = sql("select $C{u.*}, 243 from $T{User u}").query();
    Object[] object = dbOomQuery.find(User.class, Integer.class);

    assertEquals(2, object.length);
    User user = (User) object[0];
    assertEquals(1, user.userId);
    assertEquals("Gandalf", user.name);
    assertEquals(0, user.exp);

    assertEquals(243, ((Integer) object[1]).intValue());
View Full Code Here

TOP

Related Classes of jodd.db.oom.tst.User

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.