source: ether_ndacc_bis/persistence/interface/com/ether/PersistenceException.java @ 827

Last change on this file since 827 was 827, checked in by npipsl, 9 years ago

Changement Jussieu vers Polytechnique

File size: 1.3 KB
Line 
1package com.ether;
2
3/**
4 * @author vmipsl
5 * @date 28 jan 2011
6 */
7@SuppressWarnings("serial")
8public class PersistenceException
9        extends FormattedException
10{
11    public PersistenceException( final PersistenceCode code, final Throwable throwable, final Object... parameters )
12    {
13        this( code, DEFAULT_MESSAGE, throwable, parameters );
14    }
15
16    public PersistenceException( final PersistenceCode code, final Object... parameters )
17    {
18        this( code, DEFAULT_MESSAGE, DEFAULT_THROWABLE, parameters );
19    }
20   
21    protected PersistenceException( final PersistenceCode code, final String message, final Throwable throwable, final Object... parameters )
22    {
23        super( code, message, throwable, parameters );
24    }
25
26    protected PersistenceException( final PersistenceCode code, final String message, final Object... parameters )
27    {
28        super( code, message, DEFAULT_THROWABLE, parameters );
29    }
30   
31    public static enum PersistenceCode implements Code
32    {
33        UNKNOWN_FAILURE,
34        CLEANUP_FAILURE,
35        CONCURRENCY_FAILURE,
36        RESOURCE_FAILURE,
37        INTEGRITY_VIOLATION,
38        RETRIEVAL_FAILURE,
39        DATA_SOURCE_LOOKUP_FAILURE,
40        INVALID_API_USAGE,
41        INVALID_RESOURCE_USAGE,
42        PERMISSION_DENIED,
43        INVALID_ARGUMENT,
44        OBJECT_TO_DELETE_NOT_FOUND,
45    }
46}
Note: See TracBrowser for help on using the repository browser.