01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.core.exceptions;
17:
18: import org.kuali.core.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: super ();
35: }
36:
37: /**
38: * Constructs a BusinessObjectNotFoundException.java.
39: *
40: * @param message
41: */
42: public BusinessObjectNotFoundException(String message) {
43: super (message);
44: }
45:
46: /**
47: * Constructs a BusinessObjectNotFoundException.java.
48: *
49: * @param message
50: * @param cause
51: */
52: public BusinessObjectNotFoundException(String message,
53: Throwable cause) {
54: super (message, cause);
55: }
56:
57: /**
58: * Constructs a BusinessObjectNotFoundException.java.
59: *
60: * @param cause
61: */
62: public BusinessObjectNotFoundException(Throwable cause) {
63: super (cause);
64: }
65:
66: /**
67: *
68: * Constructs a BusinessObjectNotFoundException.java.
69: *
70: * @param bo - the business object specified which cannot be found in the database
71: * @param message - the message to pass up
72: */
73: public BusinessObjectNotFoundException(
74: PersistableBusinessObject bo, String message) {
75: super ("BO Not Found: [" + bo.getClass().getName() + "] "
76: + bo.toString() + ". " + message);
77: }
78:
79: /**
80: *
81: * Constructs a BusinessObjectNotFoundException.java.
82: *
83: * @param bo - the business object specified which cannot be found in the database
84: */
85: public BusinessObjectNotFoundException(PersistableBusinessObject bo) {
86: super ("BO Not Found: [" + bo.getClass().getName() + "] "
87: + bo.toString() + ".");
88: }
89:
90: }
|