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 | }↵ | | |
|
10 | ↵ | | |
|
11 | public DuplicateMapping↵ | | 7 | this( "unable to locate specified entity", entityName, id );↵
|
| | | 8 | }↵
|
|
12 | Exception(String type, String name) {↵ | | 9 | public EntityNotFoundException(String message, String entityName, Serializable id) {
↵
|
13 | this("Duplicate " + type + " mapping " + name, type, name);↵ | | 10 | ↵
|
14 | }↵ | | |
|
| | | 11 | super( message );↵
|
| | | 12 | this.entityName = entityName;↵
|
| | | 13 | this.id = id;↵
|
| | | 14 | }↵
|
| | | 15 |
↵
|
15 | public String getType() {↵ | | 16 | public String getEntityName() {↵
|
|
16 | return type;↵ | | 17 | return ↵
|
17 | }↵ | | 18 | entityName;↵
|
| | | 19 | }↵
|
| | | 20 |
↵
|
18 | ↵ | | 21 | ↵
|
19 | public String getName() {↵ | | 22 | public Serializable getId() {↵
|
|
20 | return name | | 23 | return id
|