source: ether_2012/persistence/interface/com/ether/PersistenceException.java @ 319

Last change on this file since 319 was 319, checked in by vmipsl, 12 years ago

Import du projet Ether pour le nouveau look 2012

File size: 1.4 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 PersistenceException(final PersistenceException exception) {
32        super(exception);
33        }
34
35        public static enum PersistenceCode implements Code
36    {
37        UNKNOWN_FAILURE,
38        CLEANUP_FAILURE,
39        CONCURRENCY_FAILURE,
40        RESOURCE_FAILURE,
41        INTEGRITY_VIOLATION,
42        RETRIEVAL_FAILURE,
43        DATA_SOURCE_LOOKUP_FAILURE,
44        INVALID_API_USAGE,
45        INVALID_RESOURCE_USAGE,
46        PERMISSION_DENIED,
47        INVALID_ARGUMENT,
48        OBJECT_TO_DELETE_NOT_FOUND,
49    }
50}
Note: See TracBrowser for help on using the repository browser.