Revision 46338 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
TableDocument.java | ||
---|---|---|
40 | 40 |
import org.gvsig.app.project.ProjectManager; |
41 | 41 |
import org.gvsig.app.project.documents.AbstractDocument; |
42 | 42 |
import org.gvsig.app.project.documents.DocumentManager; |
43 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
43 | 44 |
import org.gvsig.fmap.dal.DataTypes; |
44 | 45 |
import org.gvsig.fmap.dal.HasDataStore; |
45 | 46 |
import org.gvsig.fmap.dal.exception.DataException; |
... | ... | |
638 | 639 |
if( value == null ) { |
639 | 640 |
return false; |
640 | 641 |
} |
641 |
if( !(value instanceof FeatureStore) ) { |
|
642 |
DataStoreParameters params; |
|
643 |
if( (value instanceof FeatureStore) ) { |
|
644 |
params = ((FeatureStore) value).getParameters(); |
|
645 |
} else if(value instanceof DataStoreParameters){ |
|
646 |
params = (DataStoreParameters) value; |
|
647 |
} else { |
|
642 | 648 |
return false; |
643 | 649 |
} |
644 |
String storeFullName = ((FeatureStore)value).getFullName(); |
|
645 | 650 |
FeatureStore featureStore = this.getStore(); |
646 |
if( StringUtils.equals(featureStore.getFullName(), storeFullName)){
|
|
651 |
if(featureStore.getParameters().isTheSameStore(params)){
|
|
647 | 652 |
return true; |
648 | 653 |
} |
649 | 654 |
return false; |
... | ... | |
654 | 659 |
try { |
655 | 660 |
this.getStore().refresh(); |
656 | 661 |
} catch (DataException e) { |
657 |
|
|
662 |
logger.warn("Can't refresh table", e); |
|
658 | 663 |
} |
659 | 664 |
} |
660 | 665 |
} |
Also available in: Unified diff