Package: TypeOrAssociationNotFoundException
TypeOrAssociationNotFoundException
| name | instruction | branch | complexity | line | method | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TypeOrAssociationNotFoundException(String) | 
 | 
 | 
 | 
 | 
 | ||||||||||||||||||||
| TypeOrAssociationNotFoundException(long) | 
 | 
 | 
 | 
 | 
 | ||||||||||||||||||||
| printStackTrace() | 
 | 
 | 
 | 
 | 
 | ||||||||||||||||||||
Coverage
1: package de.fhdw.wtf.persistence.exception;
2: 
3: /**
4:  * Fehler der geworfen wird, wenn eine Assoziation oder ein Type nicht in der Datenbank gefunden wurde.
5:  */
6: public class TypeOrAssociationNotFoundException extends PersistenceException {
7:         /**
8:          * 
9:          */
10:         private static final long serialVersionUID = 1L;
11:         /**
12:          * a part of the message of the exception.
13:          */
14:         private static final String NOT_FOUND_MESAGE_PREFIX = "For the given name ";
15:         /**
16:          * a part of the message of the exception.
17:          */
18:         private static final String NOT_FOUND_MESSAGE_SUFFIX = " no association or type was found";
19:         
20:         /**
21:          * @param id
22:          *            ist die id des nicht gefundenen Types oder der Assoziation in der Datenbank.
23:          */
24:         public TypeOrAssociationNotFoundException(final long id) {
25:                 super(NOT_FOUND_MESAGE_PREFIX + id + NOT_FOUND_MESSAGE_SUFFIX, null);
26:         }
27:         
28:         /**
29:          * @param name
30:          *            ist der name des nicht gefundenen Types oder der Assoziation in der Datenbank.
31:          */
32:         public TypeOrAssociationNotFoundException(final String name) {
33:                 super(NOT_FOUND_MESAGE_PREFIX + name + NOT_FOUND_MESSAGE_SUFFIX, null);
34:                 
35:         }
36:         
37:         @Override
38:         public void printStackTrace() {
39:                 System.err.println(this.getMessage() + this.fillInStackTrace());
40:         }
41:         
42: }