svn-gvsig-desktop / trunk / libraries / libTools / src / org / gvsig / tools / persistence / PersistenceException.java @ 24019
History | View | Annotate | Download (1.01 KB)
1 |
package org.gvsig.tools.persistence; |
---|---|
2 |
|
3 |
import java.util.HashMap; |
4 |
import java.util.Map; |
5 |
|
6 |
import org.gvsig.tools.exception.BaseException; |
7 |
|
8 |
public class PersistenceException extends BaseException { |
9 |
|
10 |
/**
|
11 |
*
|
12 |
*/
|
13 |
private static final long serialVersionUID = -3729654883985281840L; |
14 |
private final static String MESSAGE_FORMAT = "Error getting or setting the state of the object."; |
15 |
private final static String MESSAGE_KEY = "_PersistenceException"; |
16 |
|
17 |
protected Map values = new HashMap(); |
18 |
|
19 |
public PersistenceException(String messageFormat, Throwable cause, |
20 |
String messageKey, long code) { |
21 |
super(messageFormat, cause, messageKey, code);
|
22 |
} |
23 |
|
24 |
public PersistenceException(String messageFormat, String messageKey, |
25 |
long code) {
|
26 |
super(messageFormat, messageKey, code);
|
27 |
} |
28 |
|
29 |
public PersistenceException(Throwable cause) { |
30 |
super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
|
31 |
} |
32 |
|
33 |
protected void setValue(String name, String value) { |
34 |
this.values.put(name, value);
|
35 |
} |
36 |
|
37 |
protected Map values() { |
38 |
return this.values; |
39 |
} |
40 |
} |