svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.impl / src / main / java / org / gvsig / fmap / dal / feature / impl / DefaultFeatureStoreNotification.java @ 40435
History | View | Annotate | Download (2.65 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.EditableFeatureType; |
6 |
import org.gvsig.fmap.dal.feature.Feature; |
7 |
import org.gvsig.fmap.dal.feature.FeatureIndex; |
8 |
import org.gvsig.fmap.dal.feature.FeatureStoreNotification; |
9 |
import org.gvsig.tools.undo.command.Command; |
10 |
|
11 |
public class DefaultFeatureStoreNotification implements |
12 |
FeatureStoreNotification { |
13 |
private Feature feature = null; |
14 |
private DataSet collectionResult = null; |
15 |
private boolean loadCollectionSucefully = false; |
16 |
private Exception exceptionLoading = null; |
17 |
private Command command = null; |
18 |
private EditableFeatureType featureType = null; |
19 |
private String type; |
20 |
private DataStore source;
|
21 |
private FeatureIndex index;
|
22 |
|
23 |
protected void init(DataStore source, String type) { |
24 |
this.source = source;
|
25 |
this.type = type;
|
26 |
} |
27 |
|
28 |
public DefaultFeatureStoreNotification(DataStore source, String type) { |
29 |
this.init(source, type);
|
30 |
} |
31 |
|
32 |
public DefaultFeatureStoreNotification(DataStore source, String type, Feature feature) { |
33 |
this.init(source, type);
|
34 |
this.feature = feature;
|
35 |
} |
36 |
public DefaultFeatureStoreNotification(DataStore source, String type, Command command) { |
37 |
this.init(source, type);
|
38 |
this.command = command;
|
39 |
} |
40 |
|
41 |
public DefaultFeatureStoreNotification(DataStore source, String type, Exception exception) { |
42 |
this.init(source, type);
|
43 |
this.loadCollectionSucefully = false; |
44 |
this.exceptionLoading = exception;
|
45 |
} |
46 |
|
47 |
public DefaultFeatureStoreNotification(DataStore source, String type, DataSet collection) { |
48 |
this.init(source, type);
|
49 |
this.loadCollectionSucefully = true; |
50 |
this.collectionResult = collection;
|
51 |
} |
52 |
|
53 |
|
54 |
public DefaultFeatureStoreNotification(DataStore source, String type, |
55 |
EditableFeatureType featureType) { |
56 |
this.init(source, type);
|
57 |
this.featureType = featureType;
|
58 |
} |
59 |
|
60 |
public DefaultFeatureStoreNotification(DataStore source, String type, |
61 |
FeatureIndex index) { |
62 |
this.init(source, type);
|
63 |
this.index = index;
|
64 |
} |
65 |
|
66 |
public Feature getFeature() {
|
67 |
return feature;
|
68 |
} |
69 |
|
70 |
public EditableFeatureType getFeatureType() {
|
71 |
return featureType;
|
72 |
} |
73 |
|
74 |
public DataSet getCollectionResult() {
|
75 |
return this.collectionResult; |
76 |
} |
77 |
|
78 |
public Exception getExceptionLoading() { |
79 |
return this.exceptionLoading; |
80 |
} |
81 |
|
82 |
public boolean loadSucefully() { |
83 |
return this.loadCollectionSucefully; |
84 |
} |
85 |
|
86 |
public Command getCommand() {
|
87 |
return this.command; |
88 |
} |
89 |
|
90 |
public DataStore getSource() {
|
91 |
return source;
|
92 |
} |
93 |
|
94 |
public String getType() { |
95 |
return type;
|
96 |
} |
97 |
|
98 |
public FeatureIndex getIndex() {
|
99 |
return index;
|
100 |
} |
101 |
} |