1 | public class DuplicateMappingException extends MappingException {↵ | | 1 | public static class EntityNotFoundException extends RuntimeException {↵
|
|
|
2 | private final String name;↵ | | 2 | private final String entityName;↵
|
|
3 | private final String type;↵ | | 3 | private final Seri↵
|
|
4 | public DuplicateMappingException(String customMessage, String typ↵ | | 4 | alizable id;↵
|
|
5 | e, String name) {↵ | | 5 | public EntityNotFoundException(String entityName, Serializable id) {
↵
|
6 | super(customMessage);↵ | | 6 | ↵
|
7 | this.type=type;↵ | | |
|
8 | this.name=name;↵ | | |
|
9 | }↵ | | 7 | this( "unable to locate specified entity", entityName, id );↵
|
| | | 8 | }↵
|
| | | 9 |
↵
|
10 | ↵ | | 10 | ↵
|
11 | public DuplicateMappingException(String type, String name) {↵ | | 11 | public EntityNotFoundException(String message, String ↵
|
12 | this("Duplicate " + type + " mapping " + name, type, name);↵ | | |
|
13 | }↵ | | |
|
|
| | | 12 | entityName, Serializable id) {↵
|
| | | 13 | super( message );↵
|
| | | 14 | this.entityName = entityName;↵
|
| | | 15 | this.id = id;↵
|
| | | 16 | }↵
|
|
14 | public String getType() {↵ | | 17 | public String getEntityName() {↵
|
|
15 | return type;↵ | | 18 | return ↵
|
16 | }↵ | | |
|
17 | ↵ | | |
|
| | | 19 | entityName;↵
|
| | | 20 | }↵
|
|
18 | public String getName() {↵ | | 21 | public Serializable getId() {
↵
|
19 | return name;↵ | | 22 | return id;
↵
|
20 | | | 23 |
|