Statistics
| Revision:

root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / impl / DefaultFeatureStoreNotification.java @ 24496

History | View | Annotate | Download (2.33 KB)

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

    
3
import org.gvsig.fmap.dal.DataSet;
4
import org.gvsig.fmap.dal.DataStore;
5
import org.gvsig.fmap.dal.feature.Command;
6
import org.gvsig.fmap.dal.feature.EditableFeatureType;
7
import org.gvsig.fmap.dal.feature.Feature;
8
import org.gvsig.fmap.dal.feature.FeatureStoreNotification;
9

    
10
public class DefaultFeatureStoreNotification implements
11
                FeatureStoreNotification {
12
        private Feature feature = null;
13
        private DataSet collectionResult = null;
14
        private boolean loadCollectionSucefully = false;
15
        private Exception exceptionLoading = null;
16
        private Command command = null;
17
        private EditableFeatureType featureType = null;
18
        private String type;
19
        private DataStore source;
20

    
21
        protected void init(DataStore source, String type) {
22
                this.source = source;
23
                this.type = type;
24
        }
25

    
26
        public DefaultFeatureStoreNotification(DataStore source, String type) {
27
                this.init(source, type);
28
        }
29

    
30
        public DefaultFeatureStoreNotification(DataStore source, String type, Feature feature) {
31
                this.init(source, type);
32
                this.feature = feature;
33
        }
34
        public DefaultFeatureStoreNotification(DataStore source, String type, Command command) {
35
                this.init(source, type);
36
                this.command = command;
37
        }
38

    
39
        public DefaultFeatureStoreNotification(DataStore source, String type, Exception exception) {
40
                this.init(source, type);
41
                this.loadCollectionSucefully = false;
42
                this.exceptionLoading = exception;
43
        }
44

    
45
        public DefaultFeatureStoreNotification(DataStore source, String type, DataSet collection) {
46
                this.init(source, type);
47
                this.loadCollectionSucefully = true;
48
                this.collectionResult = collection;
49
        }
50

    
51

    
52
        public DefaultFeatureStoreNotification(DataStore source, String type,
53
                        EditableFeatureType featureType) {
54
                this.init(source, type);
55
                this.featureType = featureType;
56
        }
57

    
58
        public Feature getFeature() {
59
                return feature;
60
        }
61

    
62
        public EditableFeatureType getFeatureType() {
63
                return featureType;
64
        }
65

    
66
        public DataSet getCollectionResult() {
67
                return this.collectionResult;
68
        }
69

    
70
        public Exception getExceptionLoading() {
71
                return this.exceptionLoading;
72
        }
73

    
74
        public boolean loadSucefully() {
75
                return this.loadCollectionSucefully;
76
        }
77

    
78
        public Command getCommand() {
79
                return this.command;
80
        }
81

    
82
        public DataStore getSource() {
83
                return source;
84
        }
85

    
86
        public String getType() {
87
                return type;
88
        }
89

    
90
}