Statistics
| Revision:

svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libTools / src / org / gvsig / tools / persistence / impl / exception / PersistenceTypeNotSupportedException.java @ 29956

History | View | Annotate | Download (896 Bytes)

1
package org.gvsig.tools.persistence.impl.exception;
2

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

    
6
import org.gvsig.tools.persistence.PersistenceException;
7

    
8

    
9
public class PersistenceTypeNotSupportedException extends PersistenceException {
10

    
11
        /**
12
         *
13
         */
14
        private static final long serialVersionUID = -4330166940284544121L;
15
        private final static String MESSAGE_FORMAT = "Can't persist '%(className)' values.";
16
        private final static String MESSAGE_KEY = "_PersistenceTypeNotSupportedException";
17
        private String className;
18

    
19
        public PersistenceTypeNotSupportedException(Class theClass) {
20
                this(theClass.getName());
21
        }
22
        public PersistenceTypeNotSupportedException(String className) {
23
                super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
24
                this.className = className;
25
        }
26

    
27
    protected Map values() {
28
        return Collections
29
                .singletonMap("className", className);
30
    }
31
}