01: package org.hibernate;
02:
03: /**
04: * Thrown when a resource for a mapping could not be found.
05: *
06: * @author Max Rydahl Andersen
07: *
08: */
09: public class MappingNotFoundException extends MappingException {
10:
11: private final String path;
12: private final String type;
13:
14: public MappingNotFoundException(String customMessage, String type,
15: String path, Throwable cause) {
16: super (customMessage, cause);
17: this .type = type;
18: this .path = path;
19: }
20:
21: public MappingNotFoundException(String customMessage, String type,
22: String path) {
23: super (customMessage);
24: this .type = type;
25: this .path = path;
26: }
27:
28: public MappingNotFoundException(String type, String path) {
29: this (type + ": " + path + " not found", type, path);
30: }
31:
32: public MappingNotFoundException(String type, String path,
33: Throwable cause) {
34: this (type + ": " + path + " not found", type, path, cause);
35: }
36:
37: public String getType() {
38: return type;
39: }
40:
41: public String getPath() {
42: return path;
43: }
44: }
|