Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.api / src / main / java / org / gvsig / fmap / dal / feature / exception / AttributeNameException.java @ 40597

History | View | Annotate | Download (1.05 KB)

1
package org.gvsig.fmap.dal.feature.exception;
2

    
3
import org.gvsig.fmap.dal.exception.DataException;
4

    
5
/**
6
 * 
7
 * Used to notify the case when the name of an attribute is not valid
8
 * for a certain data store. Example: A field name longer than
9
 * 11 characters in a DBF file. Perhaps: a field name with invalid characters
10
 * in a database.
11
 * 
12
 * @author jldominguez
13
 *
14
 */
15
public class AttributeNameException extends DataException {
16
        
17
        /**
18
         * 
19
         */
20
        private static final long serialVersionUID = 1L;
21
        private final static String MESSAGE_FORMAT =
22
                        "Attribute name '%(attrname)' not valid in '%(storeName)'.";
23
        private final static String MESSAGE_KEY = "_AttributeNameException";
24

    
25
        public AttributeNameException(
26
                        String attrname,
27
                        String storeName) {
28
                
29
                super(MESSAGE_FORMAT, MESSAGE_KEY, serialVersionUID);
30
                setValue("attrname", attrname);
31
                setValue("storeName", storeName);
32

    
33
        }
34
        
35
        public AttributeNameException(
36
                        String messageFormat, String messageKey, long code) {
37
                
38
                super(messageFormat, messageKey, code);
39
        }
40

    
41

    
42
}