Statistics
| Revision:

svn-gvsig-desktop / tags / v1_0_2_Build_910 / libraries / libFMap / src / com / iver / cit / gvsig / fmap / edition / DefaultRowEdited.java @ 11275

History | View | Annotate | Download (1.22 KB)

1 3653 fjp
package com.iver.cit.gvsig.fmap.edition;
2
3
import com.hardcode.gdbms.engine.values.Value;
4 3887 caballero
import com.iver.cit.gvsig.fmap.core.DefaultFeature;
5 6227 fjp
import com.iver.cit.gvsig.fmap.core.IGeometry;
6 3653 fjp
import com.iver.cit.gvsig.fmap.core.IRow;
7
8
public class DefaultRowEdited implements IRowEdited {
9 3834 caballero
10 3653 fjp
        private IRow row;
11
        private int status;
12 4115 fjp
        private int index;
13 3834 caballero
14 3653 fjp
        /**
15
         * Quiz?s conviene que RowEdited tenga un getRow y un getStatus.
16
         * As? valdr?a tambi?n para los feature.
17 3834 caballero
         *
18 3653 fjp
         * @param baseRow
19
         * @param status
20 4191 fjp
         * @param externalIndex
21 3653 fjp
         */
22 4115 fjp
        public DefaultRowEdited(IRow baseRow, int status, int index)
23 3653 fjp
        {
24
                this.status = status;
25
                row = baseRow;
26 4115 fjp
                this.index = index;
27 3653 fjp
        }
28 3686 fjp
        public IRow getLinkedRow() {
29
                return row;
30 3653 fjp
        }
31
32
        public int getStatus() {
33
                return status;
34
        }
35
36
        public String getID() {
37
                return row.getID();
38
        }
39
40
        public Value getAttribute(int fieldIndex) {
41
                return row.getAttribute(fieldIndex);
42
        }
43 3834 caballero
        public Value[] getAttributes() {
44
                return row.getAttributes();
45
        }
46 4026 caballero
        public IRow cloneRow() {
47 6227 fjp
                DefaultRowEdited nr = new DefaultRowEdited(row.cloneRow(), status, index);
48
                return nr;
49 3887 caballero
        }
50 4115 fjp
        public int getIndex() {
51
                return index;
52
        }
53 4191 fjp
        public void setID(String ID) {
54
                row.setID(ID);
55
        }
56 6212 fjp
        public void setAttributes(Value[] att) {
57
                row.setAttributes(att);
58
        }
59 3653 fjp
60
}