Package org.springframework.orm

Examples of org.springframework.orm.ObjectRetrievalFailureException


        parameterDao.verify();

        // reset expectations
        parameterDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Parameter.class, parameter.getParameterId());
        parameterDao.expects(once()).method("removeParameter").isVoid();
        parameterDao.expects(once()).method("getParameter").will(throwException(ex));
        parameterManager.removeParameter(parameterId);
        try {
            parameterManager.getParameter(parameterId);
View Full Code Here


        objectConstructionDao.verify();

        // reset expectations
        objectConstructionDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ObjectConstruction.class, objectConstruction.getTypeId());
        objectConstructionDao.expects(once()).method("removeObjectConstruction").isVoid();
        objectConstructionDao.expects(once()).method("getObjectConstruction").will(throwException(ex));
        objectConstructionManager.removeObjectConstruction(objectConstructionId);
        try {
            objectConstructionManager.getObjectConstruction(objectConstructionId);
View Full Code Here

        questionTypeDao.verify();

        // reset expectations
        questionTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(QuestionType.class, questionType.getQuestionTypeId());
        questionTypeDao.expects(once()).method("removeQuestionType").isVoid();
        questionTypeDao.expects(once()).method("getQuestionType").will(throwException(ex));
        questionTypeManager.removeQuestionType(questionTypeId);
        try {
            questionTypeManager.getQuestionType(questionTypeId);
View Full Code Here

        reasonDao.verify();

        // reset expectations
        reasonDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Reason.class, reason.getReasonId());
        reasonDao.expects(once()).method("removeReason").isVoid();
        reasonDao.expects(once()).method("getReason").will(throwException(ex));
        reasonManager.removeReason(reasonId);
        try {
            reasonManager.getReason(reasonId);
View Full Code Here

        defectCategoryDao.verify();

        // reset expectations
        defectCategoryDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectCategory.class, defectCategory.getDefectCategoryId());
        defectCategoryDao.expects(once()).method("removeDefectCategory").isVoid();
        defectCategoryDao.expects(once()).method("getDefectCategory").will(throwException(ex));
        defectCategoryManager.removeDefectCategory(defectCategoryId);
        try {
            defectCategoryManager.getDefectCategory(defectCategoryId);
View Full Code Here

        constructionExampleDao.verify();

        // reset expectations
        constructionExampleDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ConstructionExample.class, constructionExample.getExampleId());
        constructionExampleDao.expects(once()).method("removeConstructionExample").isVoid();
        constructionExampleDao.expects(once()).method("getConstructionExample").will(throwException(ex));
        constructionExampleManager.removeConstructionExample(constructionExampleId);
        try {
            constructionExampleManager.getConstructionExample(constructionExampleId);
View Full Code Here

        authentificationElementDao.verify();

        // reset expectations
        authentificationElementDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(AuthentificationElement.class, authentificationElement.getAuthentificationId());
        authentificationElementDao.expects(once()).method("removeAuthentificationElement").isVoid();
        authentificationElementDao.expects(once()).method("getAuthentificationElement").will(throwException(ex));
        authentificationElementManager.removeAuthentificationElement(authentificationElementId);
        try {
            authentificationElementManager.getAuthentificationElement(authentificationElementId);
View Full Code Here

        objectAnswerDao.verify();

        // reset expectations
        objectAnswerDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ObjectAnswer.class, objectAnswer.getObjectAnswerId());
        objectAnswerDao.expects(once()).method("removeObjectAnswer").isVoid();
        objectAnswerDao.expects(once()).method("getObjectAnswer").will(throwException(ex));
        objectAnswerManager.removeObjectAnswer(objectAnswerId);
        try {
            objectAnswerManager.getObjectAnswer(objectAnswerId);
View Full Code Here

  // @Override
  protected Object doGetObject(Serializable id) {
    Object o = getHibernateTemplate().get(getServiceClass(), id);

    if (o == null) {
      throw new ObjectRetrievalFailureException(getServiceClass(), id);
    }

    return o;
  }
View Full Code Here

        User user = (User) getObject(userId);

        if (user == null) {
            log.warn("uh oh, user '" + userId + "' not found...");
            throw new ObjectRetrievalFailureException(User.class, userId);
        }

        return user;
    }
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.