Package com.tll.dao

Examples of com.tll.dao.NonUniqueResultException


    final List<E> list = findEntities(criteria, null);
    if(list == null || list.size() < 1) {
      throw new EntityNotFoundException("No matching entity found.");
    }
    else if(list.size() > 1) {
      throw new NonUniqueResultException("More than one matching entity found.");
    }
    assert list.size() == 1;
    return list.get(0);
  }
View Full Code Here


    final List<E> list = findEntities(criteria, null);
    if(list == null || list.size() < 1) {
      throw new EntityNotFoundException("No matching entity found.");
    }
    else if(list.size() > 1) {
      throw new NonUniqueResultException("More than one matching entity found.");
    }
    assert list.size() == 1;
    return list.get(0);
  }
View Full Code Here

TOP

Related Classes of com.tll.dao.NonUniqueResultException

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.