| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| BusinessObjectNotFoundException |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2006-2008 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kns.exception; | |
| 17 | ||
| 18 | import org.kuali.rice.kns.bo.PersistableBusinessObject; | |
| 19 | ||
| 20 | /** | |
| 21 | * This class represents a situation where a business object is specified for lookup or loading, but it does not exist in the | |
| 22 | * database. | |
| 23 | * | |
| 24 | * This exception can be used for when that is a fatal error. | |
| 25 | * | |
| 26 | * | |
| 27 | */ | |
| 28 | public class BusinessObjectNotFoundException extends RuntimeException { | |
| 29 | ||
| 30 | /** | |
| 31 | * Constructs a BusinessObjectNotFoundException.java. | |
| 32 | */ | |
| 33 | public BusinessObjectNotFoundException() { | |
| 34 | 0 | super(); |
| 35 | 0 | } |
| 36 | ||
| 37 | /** | |
| 38 | * Constructs a BusinessObjectNotFoundException.java. | |
| 39 | * | |
| 40 | * @param message | |
| 41 | */ | |
| 42 | public BusinessObjectNotFoundException(String message) { | |
| 43 | 0 | super(message); |
| 44 | 0 | } |
| 45 | ||
| 46 | /** | |
| 47 | * Constructs a BusinessObjectNotFoundException.java. | |
| 48 | * | |
| 49 | * @param message | |
| 50 | * @param cause | |
| 51 | */ | |
| 52 | public BusinessObjectNotFoundException(String message, Throwable cause) { | |
| 53 | 0 | super(message, cause); |
| 54 | 0 | } |
| 55 | ||
| 56 | /** | |
| 57 | * Constructs a BusinessObjectNotFoundException.java. | |
| 58 | * | |
| 59 | * @param cause | |
| 60 | */ | |
| 61 | public BusinessObjectNotFoundException(Throwable cause) { | |
| 62 | 0 | super(cause); |
| 63 | 0 | } |
| 64 | ||
| 65 | /** | |
| 66 | * | |
| 67 | * Constructs a BusinessObjectNotFoundException.java. | |
| 68 | * | |
| 69 | * @param bo - the business object specified which cannot be found in the database | |
| 70 | * @param message - the message to pass up | |
| 71 | */ | |
| 72 | public BusinessObjectNotFoundException(PersistableBusinessObject bo, String message) { | |
| 73 | 0 | super("BO Not Found: [" + bo.getClass().getName() + "] " + bo.toString() + ". " + message); |
| 74 | 0 | } |
| 75 | ||
| 76 | /** | |
| 77 | * | |
| 78 | * Constructs a BusinessObjectNotFoundException.java. | |
| 79 | * | |
| 80 | * @param bo - the business object specified which cannot be found in the database | |
| 81 | */ | |
| 82 | public BusinessObjectNotFoundException(PersistableBusinessObject bo) { | |
| 83 | 0 | super("BO Not Found: [" + bo.getClass().getName() + "] " + bo.toString() + "."); |
| 84 | 0 | } |
| 85 | ||
| 86 | } |