Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libTools / src / org / gvsig / tools / persistence / PersistenceCreateException.java @ 30619

History | View | Annotate | Download (782 Bytes)

1
package org.gvsig.tools.persistence;
2

    
3
import java.util.Collections;
4
import java.util.Map;
5

    
6
public class PersistenceCreateException extends PersistenceRuntimeException {
7

    
8
        /**
9
         *
10
         */
11
        private static final long serialVersionUID = 1173336779528392650L;
12
        private final static String MESSAGE_FORMAT = "Exception creating new instance of '%(class)'.";
13
        private final static String MESSAGE_KEY = "_PersistenceCreateException";
14
        private PersistentState state;
15

    
16
        public PersistenceCreateException(PersistentState state, Throwable cause) {
17
                super(MESSAGE_FORMAT, cause, MESSAGE_KEY, serialVersionUID);
18
                this.state = state;
19
        }
20

    
21
        public PersistentState getState() {
22
                return state;
23
        }
24

    
25
    protected Map values() {
26
                return Collections.singletonMap("class", state.getTheClassName());
27
        }
28

    
29
}