Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / IWriter.java @ 10036

History | View | Annotate | Download (1.57 KB)

1
package com.iver.cit.gvsig.fmap.edition;
2

    
3
import java.util.Properties;
4

    
5
import com.hardcode.driverManager.Driver;
6
import com.iver.cit.gvsig.fmap.drivers.ITableDefinition;
7

    
8
public interface IWriter extends Driver{
9
        void preProcess() throws EditionException;
10

    
11
        /**
12
         * Aqu? dentro se puede hacer el chequeo de las reglas asignadas para que
13
         * antes de guardar algo, se compruebe que es correcto. Aunque lo ideal
14
         * ser?a haberlo hecho antes, para que lo que se guarde est? corregido al
15
         * m?ximo.
16
         */
17
        void process(IRowEdited row) throws EditionException;
18

    
19
        void postProcess() throws EditionException;
20
        
21
        /**
22
         * A developer can use this Properties for his own purposes. For example, to
23
         * let his extension know something about one writer. 
24
         * <br>
25
         * We can found for example:
26
         * <br>
27
         * <b>FieldNameMaxLength<b>: Maximum length of field name (Null or 0 --> unlimited).
28
         * 
29
         * @param capability
30
         * @return A message describing the capability. Null if not supported.
31
         */
32
        public String getCapability(String capability);
33
        
34
        /**
35
         * @param capabilities The capabilities to set.
36
         */
37
        public void setCapabilities(Properties capabilities);
38

    
39

    
40
        public abstract boolean canWriteAttribute(int sqlType);
41
        public abstract boolean canAlterTable();
42
        public abstract boolean canSaveEdits();
43

    
44
        public void initialize(ITableDefinition tableDefinition) throws EditionException ;
45

    
46
        public ITableDefinition getTableDefinition();
47

    
48
        /**
49
         * @return true if the driver needs to iterate trhu all records.
50
         * for example, shp files need return true. jdbc writers will return false
51
         */
52
        public boolean isWriteAll();
53

    
54

    
55
}