Package com.github.dactiv.orm.test.entity

Examples of com.github.dactiv.orm.test.entity.User


    assertEquals(user.get(0).getLoginName(), "maurice");
  }

  @Test
  public void testFindUnique() {
    User user = new User();
   
    user = userDao.findUniqueByCriterion(new Criterion[]{
        Restrictions.eq("loginName", "maurice"),
        Restrictions.eq("state", 1)
    });
    assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0001");
   
    user = userDao.findUniqueByProperty("loginName", "maurice");
    assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0001");
   
    user = userDao.findUniqueByProperty("realName", "Mot", RestrictionNames.LIKE);
    assertEquals(user.getId(), "SJDK3849CKMS3849DJCK2039ZMSK0003");
  }
View Full Code Here

TOP

Related Classes of com.github.dactiv.orm.test.entity.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.