Revision 43152 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/DefaultFeatureStore.java

View differences:

DefaultFeatureStore.java
25 25
package org.gvsig.fmap.dal.feature.impl;
26 26

  
27 27
import org.gvsig.fmap.dal.feature.spi.SQLBuilderBase;
28

  
28 29
import java.util.ArrayList;
29 30
import java.util.Collection;
30 31
import java.util.Collections;
......
38 39
import java.util.logging.Level;
39 40

  
40 41
import org.cresques.cts.IProjection;
42

  
41 43
import org.gvsig.fmap.dal.DALLocator;
42 44
import org.gvsig.fmap.dal.DataManager;
43 45
import org.gvsig.fmap.dal.DataQuery;
......
46 48
import org.gvsig.fmap.dal.DataStore;
47 49
import org.gvsig.fmap.dal.DataStoreNotification;
48 50
import org.gvsig.fmap.dal.DataStoreParameters;
51
import org.gvsig.fmap.dal.DataStoreProviderFactory;
49 52
import org.gvsig.fmap.dal.ExpressionEvaluator;
50 53
import org.gvsig.fmap.dal.exception.CloneException;
51 54
import org.gvsig.fmap.dal.exception.CloseException;
......
150 153
import org.gvsig.tools.undo.UndoException;
151 154
import org.gvsig.tools.undo.command.Command;
152 155
import org.gvsig.tools.visitor.Visitor;
156

  
153 157
import org.slf4j.Logger;
154 158
import org.slf4j.LoggerFactory;
155 159

  
......
220 224
        DynObjectManager dynManager = ToolsLocator.getDynObjectManager();
221 225

  
222 226
        this.metadata = (DelegatedDynObject) dynManager.createDynObject(
223
            FeatureStore.METADATA_DEFINITION_NAME, 
227
            FeatureStore.METADATA_DEFINITION_NAME,
224 228
            MetadataManager.METADATA_NAMESPACE
225 229
        );
226 230

  
......
475 479
        try {
476 480
            this.intialize(this.dataManager, params);
477 481
            prov = this.dataManager.createProvider(
478
                    (DataStoreProviderServices) this, 
482
                    (DataStoreProviderServices) this,
479 483
                    params
480 484
            );
481 485
            this.setProvider(prov);
482
            
486

  
483 487
            this.selection = (FeatureSelection) state.get("selection");
484 488
            this.transforms =
485 489
                (DefaultFeatureStoreTransforms) state.get("transforms");
......
533 537
                ftype = getFeatureType(defFTypeid);
534 538
                if (ftype == null) {
535 539
                	/*
536
                	 * Un error en el m?todo de PostgresQL getName(), hace que 
540
                	 * Un error en el m?todo de PostgresQL getName(), hace que
537 541
                	 * el nombre del featureType sea valor retornado por el getProviderName()
538 542
                	 * De momento se pone este parche para apa?arlo y poder mantener compatibilidad
539 543
                	 * con proyectos antiguos (2.1 y 2.2)
......
1501 1505
    public List<Feature> getFeatures() {
1502 1506
        return this.getFeatures(null, 500);
1503 1507
    }
1504
    
1508

  
1505 1509
    public void accept(Visitor visitor) throws BaseException {
1506 1510
        FeatureSet set = getFeatureSet();
1507 1511
        try {
......
2257 2261
        attr2.setIsTime(true);
2258 2262
        attr2.setFeatureAttributeEmulator(timeSupport);
2259 2263
        ft.add(attr2);
2260
        
2264

  
2261 2265
        this.timeSupport = timeSupport;
2262 2266
    }
2263
    
2267

  
2264 2268
    /* (non-Javadoc)
2265 2269
     * @see java.lang.Object#clone()
2266 2270
     */
......
2307 2311
        }
2308 2312
        return new SQLBuilderBase();
2309 2313
    }
2310
 
2311 2314

  
2315

  
2312 2316
    public FeatureSet features() throws DataException {
2313 2317
        // This is to avoid jython to create a property with this name
2314 2318
        // to access method getFeatures.
2315 2319
        return this.getFeatureSet();
2316 2320
    }
2317
    
2321

  
2322
    @Override
2323
    public DataStoreProviderFactory getFactory() {
2324
        DataStoreProviderFactory factory = dataManager.getStoreProviderFactory(parameters.getDataStoreName());
2325
        return factory;
2326
    }
2327

  
2328
    @Override
2329
    public void useCache(String providerName, DynObject parameters) throws DataException {
2330
        throw new UnsupportedOperationException();
2331
    }
2318 2332
}

Also available in: Unified diff