Package org.springframework.orm

Examples of org.springframework.orm.ObjectRetrievalFailureException


  public Detail getDetail(Integer id) {
    Detail detail = (Detail) getHibernateTemplate().get(
        Detail.class, id);
    if (detail == null) {
      throw new ObjectRetrievalFailureException(Detail.class, id);
    }
    return detail;
  }
View Full Code Here


  public Width getWidth(Integer id) {
    Width width = (Width) getHibernateTemplate().get(
        Width.class, id);
    if (width == null) {
      throw new ObjectRetrievalFailureException(Width.class, id);
    }
    return width;
  }
View Full Code Here

        materialDao.verify();

        // reset expectations
        materialDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Material.class, material.getMaterialId());
        materialDao.expects(once()).method("removeMaterial").isVoid();
        materialDao.expects(once()).method("getMaterial").will(throwException(ex));
        materialManager.removeMaterial(materialId);
        try {
            materialManager.getMaterial(materialId);
View Full Code Here

        answerDao.verify();

        // reset expectations
        answerDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Answer.class, answer.getAnswerId());
        answerDao.expects(once()).method("removeAnswer").isVoid();
        answerDao.expects(once()).method("getAnswer").will(throwException(ex));
        answerManager.removeAnswer(answerId);
        try {
            answerManager.getAnswer(answerId);
View Full Code Here

//        dao.verify();

        // delete
        dao.reset();
        // expectations
        Exception ex = new ObjectRetrievalFailureException(User.class, "foo");
        dao.expects(once()).method("removeObject").isVoid();
        dao.expects(once()).method("getObject").will(throwException(ex));
//        manager.removeObject(User.class, "foo");
//        try {
//            manager.getObject(User.class, "foo");
View Full Code Here

        constructionDefectDao.verify();

        // reset expectations
        constructionDefectDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ConstructionDefect.class, constructionDefect.getConstructionDefectId());
        constructionDefectDao.expects(once()).method("removeConstructionDefect").isVoid();
        constructionDefectDao.expects(once()).method("getConstructionDefect").will(throwException(ex));
        constructionDefectManager.removeConstructionDefect(constructionDefectId);
        try {
            constructionDefectManager.getConstructionDefect(constructionDefectId);
View Full Code Here

        objectPhotoDao.verify();

        // reset expectations
        objectPhotoDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ObjectPhoto.class, objectPhoto.getPhotoId());
        objectPhotoDao.expects(once()).method("removeObjectPhoto").isVoid();
        objectPhotoDao.expects(once()).method("getObjectPhoto").will(throwException(ex));
        objectPhotoManager.removeObjectPhoto(objectPhotoId);
        try {
            objectPhotoManager.getObjectPhoto(objectPhotoId);
View Full Code Here

        defectZoneDao.verify();

        // reset expectations
        defectZoneDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectZone.class, defectZone.getDefectZoneId());
        defectZoneDao.expects(once()).method("removeDefectZone").isVoid();
        defectZoneDao.expects(once()).method("getDefectZone").will(throwException(ex));
        defectZoneManager.removeDefectZone(defectZoneId);
        try {
            defectZoneManager.getDefectZone(defectZoneId);
View Full Code Here

        defectVarityDao.verify();

        // reset expectations
        defectVarityDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectVarity.class, defectVarity.getVarityId());
        defectVarityDao.expects(once()).method("removeDefectVarity").isVoid();
        defectVarityDao.expects(once()).method("getDefectVarity").will(throwException(ex));
        defectVarityManager.removeDefectVarity(defectVarityId);
        try {
            defectVarityManager.getDefectVarity(defectVarityId);
View Full Code Here

        dangerCategoryDao.verify();

        // reset expectations
        dangerCategoryDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DangerCategory.class, dangerCategory.getDangerCategoryId());
        dangerCategoryDao.expects(once()).method("removeDangerCategory").isVoid();
        dangerCategoryDao.expects(once()).method("getDangerCategory").will(throwException(ex));
        dangerCategoryManager.removeDangerCategory(dangerCategoryId);
        try {
            dangerCategoryManager.getDangerCategory(dangerCategoryId);
View Full Code Here

TOP

Related Classes of org.springframework.orm.ObjectRetrievalFailureException

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.