Revision 44443

View differences:

trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/project/documents/table/TableDocument.java
613 613
        if(this.associatedLayer!=null && this.associatedLayer.isTemporary()){
614 614
            return true;
615 615
        }
616
        if( this.getFeatureStore().isTemporary() ) {
617
            return true;
618
        }
616 619
        return false;
617 620
    }
618 621

  
trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/project/DefaultProject.java
943 943

  
944 944
        state.set("extents", this.extents);
945 945
        List<Document> docs = this.getDocuments();
946
        List<Document> noTempDocs = new ArrayList<Document>();
947
        for (Iterator iterator = docs.iterator(); iterator.hasNext();) {
948
            Document document = (Document) iterator.next();
946
        List<Document> noTempDocs = new ArrayList<>();
947
        for (Document document : docs) {
949 948
            if(!document.isTemporary()){
950 949
                noTempDocs.add(document);
951 950
            }
......
954 953

  
955 954
        state.set("propertiesHelper",propertiesHelper);
956 955

  
957
        List<DocumentWindowInfo> persistentWindows = new ArrayList<DocumentWindowInfo>();
956
        List<DocumentWindowInfo> persistentWindows = new ArrayList<>();
958 957
        MDIManager mdiMan = PluginServices.getMDIManager();
959 958
        IWindow[] windows = mdiMan.getOrderedWindows();
960 959
        for (int i = windows.length - 1; i >= 0; i--) {
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
3107 3107
            return false;
3108 3108
        }
3109 3109
    }
3110
 
3110

  
3111
    @Override
3112
    public boolean isTemporary() {
3113
        if( this.provider==null ) {
3114
            return true;
3115
        }
3116
        return this.provider.isTemporary();
3117
    }
3111 3118
    
3112 3119
}
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/test/java/org/gvsig/fmap/dal/feature/DummyFetureStore.java
786 786
    public boolean supportReferences() {
787 787
        return true;
788 788
    }
789

  
790
    @Override
791
    public boolean isTemporary() {
792
        return false;
793
    }
794
    
795
    
789 796
}
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.api/src/main/java/org/gvsig/fmap/dal/feature/FeatureStore.java
1181 1181
    public void createCache(String name, DynObject parameters)
1182 1182
        throws DataException;
1183 1183

  
1184
    @Override
1184 1185
    public FeatureCache getCache();
1185 1186

  
1186 1187
    public boolean isBroken();
1187 1188

  
1188
	public Throwable getBreakingsCause();
1189
    public Throwable getBreakingsCause();
1189 1190

  
1190 1191
    /**
1192
     * Indicates if the storage is temporary.
1193
     * There is no guarantee that a temporary store can be recovered from 
1194
     * its parameters. In general these will not be persistent.
1195
     * 
1196
     * @return true if the store is temporary, otherwise false.
1197
     */
1198
    public boolean isTemporary();
1199
    
1200
    /**
1191 1201
     * @param index
1192 1202
     * @return
1193 1203
     */
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/AbstractFeatureStoreProvider.java
585 585
            logger.info("Can't write prj file '" + file.getAbsolutePath() + "'.");
586 586
        }
587 587
    }
588

  
589
    @Override
590
    public boolean isTemporary() {
591
        return false;
592
    }
588 593
}
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/FeatureStoreProvider.java
256 256
        public FeatureStore getFeatureStore();
257 257
        
258 258
        public DataStoreParameters getParameters();
259
        
260
        /**
261
         * Indicates if the storage is temporary.
262
         * There is no guarantee that a temporary store can be recovered from 
263
         * its parameters. In general these will not be persistent.
264
         * 
265
         * @return true if the store is temporary, otherwise false.
266
         */
267
        public boolean isTemporary();        
259 268
}

Also available in: Unified diff