Package org.springframework.orm

Examples of org.springframework.orm.ObjectRetrievalFailureException



    public ConstructionExample getConstructionExample2(final Long exampleId) {
        ConstructionExample constructionExample = (ConstructionExample) session.get(ConstructionExample.class, exampleId);
        if (constructionExample == null) {
            throw new ObjectRetrievalFailureException(ConstructionExample.class, exampleId);
        }
        return constructionExample;
    }
View Full Code Here


        buildingObjectDao.verify();

        // reset expectations
        buildingObjectDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(BuildingObject.class, buildingObject.getObjectId());
        buildingObjectDao.expects(once()).method("removeBuildingObject").isVoid();
        buildingObjectDao.expects(once()).method("getBuildingObject").will(throwException(ex));
        buildingObjectManager.removeBuildingObject(buildingObjectId);
        try {
            buildingObjectManager.getBuildingObject(buildingObjectId);
View Full Code Here

        objectTypeDao.verify();

        // reset expectations
        objectTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ObjectType.class, objectType.getObjectTypeId());
        objectTypeDao.expects(once()).method("removeObjectType").isVoid();
        objectTypeDao.expects(once()).method("getObjectType").will(throwException(ex));
        objectTypeManager.removeObjectType(objectTypeId);
        try {
            objectTypeManager.getObjectType(objectTypeId);
View Full Code Here

        defectRecomendationDao.verify();

        // reset expectations
        defectRecomendationDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectRecomendation.class, defectRecomendation.getDefectRecomendationId());
        defectRecomendationDao.expects(once()).method("removeDefectRecomendation").isVoid();
        defectRecomendationDao.expects(once()).method("getDefectRecomendation").will(throwException(ex));
        defectRecomendationManager.removeDefectRecomendation(defectRecomendationId);
        try {
            defectRecomendationManager.getDefectRecomendation(defectRecomendationId);
View Full Code Here

        measureDao.verify();

        // reset expectations
        measureDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Measure.class, measure.getMeasureId());
        measureDao.expects(once()).method("removeMeasure").isVoid();
        measureDao.expects(once()).method("getMeasure").will(throwException(ex));
        measureManager.removeMeasure(measureId);
        try {
            measureManager.getMeasure(measureId);
View Full Code Here

        questionDao.verify();

        // reset expectations
        questionDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Question.class, question.getQuestionId());
        questionDao.expects(once()).method("removeQuestion").isVoid();
        questionDao.expects(once()).method("getQuestion").will(throwException(ex));
        questionManager.removeQuestion(questionId);
        try {
            questionManager.getQuestion(questionId);
View Full Code Here

        defectTypeDao.verify();

        // reset expectations
        defectTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(DefectType.class, defectType.getDefectTypeId());
        defectTypeDao.expects(once()).method("removeDefectType").isVoid();
        defectTypeDao.expects(once()).method("getDefectType").will(throwException(ex));
        defectTypeManager.removeDefectType(defectTypeId);
        try {
            defectTypeManager.getDefectType(defectTypeId);
View Full Code Here

        strengthDao.verify();

        // reset expectations
        strengthDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Strength.class, strength.getPointId());
        strengthDao.expects(once()).method("removeStrength").isVoid();
        strengthDao.expects(once()).method("getStrength").will(throwException(ex));
        strengthManager.removeStrength(strengthId);
        try {
            strengthManager.getStrength(strengthId);
View Full Code Here

        constructionTypeDao.verify();

        // reset expectations
        constructionTypeDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(ConstructionType.class, constructionType.getConstructionTypeId());
        constructionTypeDao.expects(once()).method("removeConstructionType").isVoid();
        constructionTypeDao.expects(once()).method("getConstructionType").will(throwException(ex));
        constructionTypeManager.removeConstructionType(constructionTypeId);
        try {
            constructionTypeManager.getConstructionType(constructionTypeId);
View Full Code Here

        hintDao.verify();

        // reset expectations
        hintDao.reset();
        // remove
        Exception ex = new ObjectRetrievalFailureException(Hint.class, hint.getHintId());
        hintDao.expects(once()).method("removeHint").isVoid();
        hintDao.expects(once()).method("getHint").will(throwException(ex));
        hintManager.removeHint(hintId);
        try {
            hintManager.getHint(hintId);
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.