Revision 36632

View differences:

branches/v2_0_0_prep/libraries/libFMap_dal/src/org/gvsig/fmap/dal/feature/AbstractFeatureStoreTransform.java
15 15
 * of the {@link FeatureStoreTransform} interface to other transform implementations. It is recommended
16 16
 * to extend this class when implementing new {@link FeatureStoreTransform}s.
17 17
 * 
18
 * The {@link FeatureType} of this class is not persistent: it has to be generated
19
 * by the child implementations of this abstract class when they are created
20
 * using the persistence mechanism.
21
 * 
22
 * @author gvSIG team
23
 * @version $Id$
18 24
 */
19 25
public abstract class AbstractFeatureStoreTransform implements
20 26
FeatureStoreTransform {
......
90 96
	        definition.addDynFieldObject("store")
91 97
	            .setClassOfValue(FeatureStore.class)
92 98
	            .setMandatory(true);
93
	        definition.addDynFieldObject("defaultFeatureType")
94
	            .setClassOfValue(FeatureType.class)
95
	            .setMandatory(true);
96
	        definition.addDynFieldList("featureTypes")
97
	            .setClassOfItems(FeatureType.class)
98
	            .setMandatory(true);
99 99
	    }
100 100
	}
101 101

  
102 102
	public void loadFromState(PersistentState state) throws PersistenceException {
103 103
		this.store = (FeatureStore) state.get("store");
104
		this.defaultFeatureType = (FeatureType) state.get("defaultFeatureType");
105
		this.featureTypes = new ArrayList(state.getList("featureTypes"));
106 104
	}
107 105

  
108 106
	public void saveToState(PersistentState state) throws PersistenceException {
109
		state.set("store", store);
110
		state.set("defaultFeatureType", defaultFeatureType);
111
		state.set("featureTypes", featureTypes);
107
		state.set("store", store);	
112 108
	}
113

  
114

  
115 109
}

Also available in: Unified diff