Revision 3306
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/repository/localdb/requests/CheckoutRequestLocaldb.java | ||
---|---|---|
111 | 111 |
helper().entity = new EntityEditableImpl(); |
112 | 112 |
helper().entity.copyfrom(entityRow); |
113 | 113 |
|
114 |
long revisionNumber = Long.MAX_VALUE; |
|
115 |
if(StringUtils.isNotBlank(helper().repositoryRevisionCode)){ |
|
116 |
RevisionsRepoTable revisionsTable = new RevisionsRepoTable(); |
|
117 |
RevisionRepoRow revisionRow = revisionsTable.getByRevisionCode(this.getRepository(), helper().repositoryRevisionCode); |
|
118 |
revisionNumber = revisionRow.getNumber(); |
|
114 |
|
|
115 |
DataRepoTable dataTable = new DataRepoTable(); |
|
116 |
DisposableIterable<Feature> features = null; |
|
117 |
if(helper().efectiveDate != null){ |
|
118 |
features = dataTable.getDataOfEntityFromEfectiveDate( |
|
119 |
this.getRepository(), |
|
120 |
helper().entity.getEntityCode(), |
|
121 |
helper().efectiveDate |
|
122 |
); |
|
123 |
} else { |
|
124 |
long revisionNumber = Long.MAX_VALUE; |
|
125 |
if(StringUtils.isNotBlank(helper().repositoryRevisionCode)){ |
|
126 |
RevisionsRepoTable revisionsTable = new RevisionsRepoTable(); |
|
127 |
RevisionRepoRow revisionRow = revisionsTable.getByRevisionCode(this.getRepository(), helper().repositoryRevisionCode); |
|
128 |
revisionNumber = revisionRow.getNumber(); |
|
129 |
} |
|
130 |
features = dataTable.getDataOfEntityToRevisionNumber( |
|
131 |
this.getRepository(), |
|
132 |
helper().entity.getEntityCode(), |
|
133 |
revisionNumber |
|
134 |
); |
|
119 | 135 |
} |
120 | 136 |
|
121 |
DataRepoTable dataTable = new DataRepoTable(); |
|
122 |
final DisposableIterable<Feature> features = dataTable.getDataOfEntityToRevisionNumber( |
|
123 |
this.getRepository(), |
|
124 |
helper().entity.getEntityCode(), |
|
125 |
revisionNumber |
|
126 |
); |
|
127 | 137 |
helper().data = new DisposableIterableAdapter<>( |
128 | 138 |
features, |
129 | 139 |
(Feature f) -> new DataRepoTable.DataRepoRow(this.getRepository(),f) |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/tables/WorkspaceChangesTable.java | ||
---|---|---|
317 | 317 |
} |
318 | 318 |
|
319 | 319 |
public DisposableFeatureSetIterable getSelectedsWithoutAddEntity(VCSGisWorkspace workspace) { |
320 |
return getSelectedsWithoutAddEntity(workspace, null); |
|
321 |
// FeatureStore store = null; |
|
322 |
// try { |
|
323 |
// store = workspace.getFeatureStore(TABLE_NAME); |
|
324 |
// FeatureQuery query = store.createFeatureQuery(); |
|
325 |
// |
|
326 |
// //FIXME: No enviar al servidor cambios repetidos sobre la misma feature |
|
327 |
// query.setFilter("\""+SELECTED+"\" AND \""+OPERATION+"\" <> "+OP_ADD_ENTITY); |
|
328 |
// query.retrievesAllAttributes(); |
|
329 |
// DisposableFeatureSetIterable changes = store.getFeatureSet(query).iterable(); |
|
330 |
// if( changes.isEmpty() ) { |
|
331 |
// DisposeUtils.disposeQuietly(changes); |
|
332 |
// return null; |
|
333 |
// } |
|
334 |
// return changes; |
|
335 |
// } catch (Exception ex) { |
|
336 |
// throw new RuntimeException("Can't retrieve all changes.", ex); |
|
337 |
// } finally { |
|
338 |
// if( store!=null ) { |
|
339 |
// DisposeUtils.dispose(store); |
|
340 |
// } |
|
341 |
// } |
|
342 |
} |
|
343 |
|
|
344 |
public DisposableFeatureSetIterable getSelectedsWithoutAddEntity(VCSGisWorkspace workspace, String entityCode) { |
|
320 | 345 |
FeatureStore store = null; |
321 | 346 |
try { |
322 | 347 |
store = workspace.getFeatureStore(TABLE_NAME); |
323 | 348 |
FeatureQuery query = store.createFeatureQuery(); |
324 | 349 |
|
325 |
//FIXME: No enviar al servidor cambios repetidos sobre la misma feature |
|
326 |
query.setFilter("\""+SELECTED+"\" AND \""+OPERATION+"\" <> "+OP_ADD_ENTITY); |
|
350 |
if( !StringUtils.isBlank(entityCode) ) { |
|
351 |
query.setFilter("\""+COD_ENTITY+"\" ='"+entityCode+"' AND \""+SELECTED+"\" AND \""+OPERATION+"\" <> "+OP_ADD_ENTITY); |
|
352 |
} else { |
|
353 |
query.setFilter("\""+SELECTED+"\" AND \""+OPERATION+"\" <> "+OP_ADD_ENTITY); |
|
354 |
} |
|
327 | 355 |
query.retrievesAllAttributes(); |
328 | 356 |
DisposableFeatureSetIterable changes = store.getFeatureSet(query).iterable(); |
329 | 357 |
if( changes.isEmpty() ) { |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/java/org/gvsig/vcsgis/lib/workspace/VCSGisWorkspaceImpl.java | ||
---|---|---|
592 | 592 |
|
593 | 593 |
@Override |
594 | 594 |
public FeatureStore openFeatureStore(String tableName) { |
595 |
EntityRow entity = null; |
|
596 |
if (!INTERNAL_WORKSPACE_TABLES.contains(tableName)) { |
|
597 |
entity = this.getWorkspaceEntityByName(tableName); |
|
598 |
if (entity == null) { |
|
599 |
return null; |
|
600 |
} |
|
601 |
} |
|
602 | 595 |
DataManager dataManager = DALLocator.getDataManager(); |
603 | 596 |
try { |
604 | 597 |
JDBCStoreParameters params = this.wsexplorer.get(tableName); |
... | ... | |
611 | 604 |
} catch (Exception ex) { |
612 | 605 |
LOGGER.trace("can't open store from '" + this.getMessageLabel() + "'.", ex); |
613 | 606 |
return null; |
614 |
// String msg = "can't open store from '" + this.getMessageLabel() + "'."; |
|
615 |
// throw new RuntimeException(msg, ex); |
|
616 | 607 |
} |
617 | 608 |
} |
618 | 609 |
|
... | ... | |
1456 | 1447 |
return useSeleccion; |
1457 | 1448 |
} |
1458 | 1449 |
|
1450 |
@SuppressWarnings("Convert2Lambda") |
|
1451 |
public boolean prepareCommitRequest(String entity, VCSGisCommitRequest request, Timestamp revisiondate, Timestamp efectivedate, String comment, SimpleTaskStatus status) { |
|
1452 |
boolean isMyStatus = false; |
|
1453 |
if (status == null) { |
|
1454 |
status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus("Prepare commit request"); |
|
1455 |
status.setAutoremove(true); |
|
1456 |
status.add(); |
|
1457 |
isMyStatus = true; |
|
1458 |
} |
|
1459 |
request.setEfectiveDate(efectivedate); |
|
1460 |
request.setRevisionDate(revisiondate); |
|
1461 |
request.setComment(comment); |
|
1462 |
WorkspaceChangesTable changesTable = new WorkspaceChangesTable(); |
|
1463 |
|
|
1464 |
LOGGER.debug("===: COMMIT: Adding changed local entities"); |
|
1465 |
status.message("Searching changed entities"); |
|
1466 |
//TODO: |
|
1467 |
// adicionamos las entidades que vamos a actualizar con las revisiones que tenemos. |
|
1468 |
DisposableFeatureSetIterable changesGroupedByEntity = changesTable.getGroupedByEntity(this); |
|
1469 |
// status.setRangeOfValues(0, changesGroupedByEntity.size64()); |
|
1470 |
status.setCurValue(0); |
|
1471 |
for (Feature fchange : changesGroupedByEntity) { |
|
1472 |
WorkspaceChangeRow change = new WorkspaceChangeRow(this, fchange); |
|
1473 |
VCSGisEntity localEntity = change.getEntity(); |
|
1474 |
LOGGER.debug("===: COMMIT: add used entity = " + fchange.toJson().toString().replace('\n', ' ')); |
|
1475 |
if (change.isSelected()) { |
|
1476 |
request.add(request.createEntity(localEntity)); |
|
1477 |
} |
|
1478 |
status.incrementCurrentValue(); |
|
1479 |
} |
|
1480 |
changesGroupedByEntity.dispose(); |
|
1481 |
|
|
1482 |
LOGGER.debug("===: COMMIT: Mark new local entities"); |
|
1483 |
status.message("Searching new entities"); |
|
1484 |
//TODO |
|
1485 |
// Marcamos como nuevas las entidades que se han dado de alta. |
|
1486 |
DisposableFeatureSetIterable changesOfAddEntities = changesTable.getByOperation(this, OP_ADD_ENTITY); |
|
1487 |
for (Feature fchange : changesOfAddEntities) { |
|
1488 |
WorkspaceChangeRow change = new WorkspaceChangeRow(this, fchange); |
|
1489 |
if (change.isSelected()) { |
|
1490 |
request.markAsNew(change.getEntity()); |
|
1491 |
} |
|
1492 |
} |
|
1493 |
changesOfAddEntities.dispose(); |
|
1494 |
|
|
1495 |
LOGGER.debug("===: COMMIT: Adding data"); |
|
1496 |
status.message("Searching changed data"); |
|
1497 |
// adicionamos los datos |
|
1498 |
boolean useSeleccion = true; |
|
1499 |
//TODO |
|
1500 |
DisposableFeatureSetIterable changes = changesTable.getSelectedsWithoutAddEntity(this, entity); |
|
1501 |
if (changes != null) { |
|
1502 |
request.add(new DisposableIterableAdapter( |
|
1503 |
changes, |
|
1504 |
new DisposableIterableAdapter.ItemConverter<Feature, VCSGisChange>() { |
|
1505 |
@Override |
|
1506 |
public VCSGisChange convert(Feature f) { |
|
1507 |
return new WorkspaceChangeRow(VCSGisWorkspaceImpl.this, f); |
|
1508 |
} |
|
1509 |
} |
|
1510 |
) |
|
1511 |
); |
|
1512 |
} |
|
1513 |
if (isMyStatus) { |
|
1514 |
status.terminate(); |
|
1515 |
} |
|
1516 |
return useSeleccion; |
|
1517 |
} |
|
1518 |
|
|
1459 | 1519 |
@Override |
1460 | 1520 |
public boolean canCommit() { |
1461 | 1521 |
return canCommit(null); |
... | ... | |
1610 | 1670 |
DisposeUtils.disposeQuietly(request); |
1611 | 1671 |
} |
1612 | 1672 |
} |
1673 |
|
|
1674 |
public int commit(String entity, Timestamp revisiondate, Timestamp efectivedate, String comment, SimpleTaskStatus status) { |
|
1675 |
VCSGisCommitRequest request = null; |
|
1676 |
if (status == null) { |
|
1677 |
status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus("Commit"); |
|
1678 |
status.setAutoremove(true); |
|
1679 |
status.add(); |
|
1680 |
} |
|
1681 |
try { |
|
1682 |
LOGGER.debug("===: COMMIT " + this.getCode() + ", " + this.getLabel()); |
|
1683 |
EntitiesTable entitiesTable = new EntitiesTable(); |
|
1684 |
WorkspaceChangesTable changesTable = new WorkspaceChangesTable(); |
|
1613 | 1685 |
|
1686 |
status.message("Preparing commit"); |
|
1687 |
reloadRepositoryEntities(status); |
|
1688 |
request = this.getRepository().createCommitRequest(); |
|
1689 |
request.setAuthenticationToken(this.authenticationToken); |
|
1690 |
request.setUserCode(this.currentUser); |
|
1691 |
|
|
1692 |
boolean useSeleccion = this.prepareCommitRequest(entity, request, revisiondate, efectivedate, comment, status); |
|
1693 |
|
|
1694 |
LOGGER.debug("===: COMMIT: Do execute request"); |
|
1695 |
status.message("Executing commit request"); |
|
1696 |
if ( execute(request) != ERR_OK) { |
|
1697 |
status.message("Can't commit changes (error " + request.getLastErrorCode() + ")"); |
|
1698 |
status.abort(); |
|
1699 |
return request.getLastErrorCode(); |
|
1700 |
} |
|
1701 |
|
|
1702 |
LOGGER.debug("===: COMMIT: update local entities table"); |
|
1703 |
status.message("Updating local metadata"); |
|
1704 |
FeatureStore entitiesStore = null; |
|
1705 |
try { |
|
1706 |
entitiesStore = this.openFeatureStore(EntitiesTable.TABLE_NAME); |
|
1707 |
entitiesStore.edit(FeatureStore.MODE_FULLEDIT); |
|
1708 |
List<VCSGisEntityEditable> changedLocalentities = request.getChangedLocalEntities(); |
|
1709 |
status.setRangeOfValues(0, changedLocalentities.size()); |
|
1710 |
status.setCurValue(0); |
|
1711 |
for (VCSGisEntity rentity : changedLocalentities) { |
|
1712 |
EntityRow entityRow = entitiesTable.getByEntityName(this, rentity.getEntityName()); |
|
1713 |
if (entityRow != null) { |
|
1714 |
entityRow.copyfrom(rentity); |
|
1715 |
entityRow.setLocalRevisionCode(rentity.getRepositoryRevisionCode()); |
|
1716 |
entityRow.update(entitiesStore); |
|
1717 |
} |
|
1718 |
status.incrementCurrentValue(); |
|
1719 |
} |
|
1720 |
entitiesStore.finishEditing(); |
|
1721 |
forceReloadWorkspaceEntities(); |
|
1722 |
} catch (Exception e) { |
|
1723 |
FeatureStore.cancelEditingQuietly(entitiesStore); |
|
1724 |
} finally { |
|
1725 |
DisposeUtils.disposeQuietly(entitiesStore); |
|
1726 |
entitiesStore = null; |
|
1727 |
} |
|
1728 |
|
|
1729 |
LOGGER.debug("===: COMMIT: clean local changes"); |
|
1730 |
status.message("Removing local list of changes"); |
|
1731 |
if (useSeleccion) { |
|
1732 |
changesTable.deleteSelecteds(this); |
|
1733 |
} else { |
|
1734 |
changesTable.deleteAll(this); |
|
1735 |
} |
|
1736 |
status.message("Commit completed"); |
|
1737 |
status.terminate(); |
|
1738 |
return ERR_NO_ERROR; |
|
1739 |
} catch (Exception ex) { |
|
1740 |
LOGGER.warn("Can't commit changes.", ex); |
|
1741 |
status.message("Can't commit changes"); |
|
1742 |
status.abort(); |
|
1743 |
return ERR_CANT_COMMIT; |
|
1744 |
} finally { |
|
1745 |
DisposeUtils.disposeQuietly(request); |
|
1746 |
} |
|
1747 |
|
|
1748 |
} |
|
1749 |
|
|
1750 |
|
|
1614 | 1751 |
@Override |
1615 | 1752 |
public int checkout(String tableName) { |
1616 | 1753 |
return checkout(tableName, null); |
... | ... | |
3205 | 3342 |
FeatureStore target = null; |
3206 | 3343 |
FeatureStore entitiesStore = null; |
3207 | 3344 |
int errcode = ERR_OK; |
3208 |
VCSGisExportRequest request = null;
|
|
3345 |
VCSGisCheckoutRequest request = null;
|
|
3209 | 3346 |
if (status == null) { |
3210 | 3347 |
status = ToolsLocator.getTaskStatusManager().createDefaultSimpleTaskStatus("_Export"); |
3211 | 3348 |
status.setAutoremove(true); |
... | ... | |
3221 | 3358 |
return ERR_ENTITY_NOT_EXISTS; |
3222 | 3359 |
} |
3223 | 3360 |
reloadRepositoryEntities(status); |
3224 |
request = this.getRepository().createExportRequest(entityName);
|
|
3361 |
request = this.getRepository().createCheckoutRequest(entityName);
|
|
3225 | 3362 |
request.setAuthenticationToken(this.authenticationToken); |
3226 | 3363 |
request.setUserCode(this.currentUser); |
3227 | 3364 |
request.setEfectiveDate(efectiveDate); |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/resources/org/gvsig/vcsgis/lib/Oracle.sql | ||
---|---|---|
61 | 61 |
-- DATA_EFECTIVEDATE, |
62 | 62 |
-- efectiveDate, |
63 | 63 |
SELECT "%1$s".* FROM |
64 |
( SELECT "%2$s", MAX("%3$s") AS "MAX_EFECTIVEDATE" FROM
|
|
64 |
( SELECT "%2$s", MAX("%6$s") AS "MAX_EFECTIVEDATE" FROM
|
|
65 | 65 |
"%1$s" |
66 |
WHERE "%4$s" = '%5$s' AND "%6$s" >= %7$s
|
|
66 |
WHERE "%4$s" = '%5$s' AND "%6$s" <= TO_TIMESTAMP('%7$s','YYYY-MM-DD HH24:MI:SS.FF')
|
|
67 | 67 |
GROUP BY "%2$s" |
68 | 68 |
) AS T1 |
69 | 69 |
LEFT JOIN |
70 | 70 |
"%1$s" |
71 | 71 |
ON T1."%2$s" = "%1$s"."%2$s" AND |
72 |
T1."MAX_EFECTIVEDATE" = "%1$s"."%3$s"
|
|
72 |
T1."MAX_EFECTIVEDATE" = "%1$s"."%6$s"
|
|
73 | 73 |
@end getDataOfEntityFromEfectiveDate |
74 | 74 |
|
75 | 75 |
@begin createWorkspaceIndex1 |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/resources/org/gvsig/vcsgis/lib/H2Spatial.sql | ||
---|---|---|
83 | 83 |
SELECT "%1$s".* FROM |
84 | 84 |
( SELECT "%2$s", MAX("%3$s") AS "MAX_EFECTIVEDATE" FROM |
85 | 85 |
"%1$s" |
86 |
WHERE "%4$s" = '%5$s' AND "%6$s" >= %7$s
|
|
86 |
WHERE "%4$s" = '%5$s' AND "%6$s" <= '%7$s'
|
|
87 | 87 |
GROUP BY "%2$s" |
88 | 88 |
) AS T1 |
89 | 89 |
LEFT JOIN |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.lib/org.gvsig.vcsgis.lib.impl/src/main/resources/org/gvsig/vcsgis/lib/PostgreSQL.sql | ||
---|---|---|
83 | 83 |
SELECT "%1$s".* FROM |
84 | 84 |
( SELECT "%2$s", MAX("%3$s") AS "MAX_EFECTIVEDATE" FROM |
85 | 85 |
"%1$s" |
86 |
WHERE "%4$s" = '%5$s' AND "%6$s" >= %7$s
|
|
86 |
WHERE "%4$s" = '%5$s' AND "%6$s" <= timestamp::'%7$s'
|
|
87 | 87 |
GROUP BY "%2$s" |
88 | 88 |
) AS T1 |
89 | 89 |
LEFT JOIN |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/export/VCSGisJExportImpl.java | ||
---|---|---|
33 | 33 |
import static jdk.nashorn.internal.codegen.OptimisticTypesPersistence.store; |
34 | 34 |
import org.apache.commons.lang3.StringUtils; |
35 | 35 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
36 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
36 | 37 |
import org.gvsig.tools.ToolsLocator; |
37 | 38 |
import org.gvsig.tools.dataTypes.DataTypeUtils; |
38 | 39 |
import org.gvsig.tools.dispose.DisposeUtils; |
... | ... | |
242 | 243 |
this.revisionPicker.setEnabled(canExport); |
243 | 244 |
this.rdbRevision.setEnabled(canExport); |
244 | 245 |
|
245 |
this.efectivePicker.setEnabled(canExport);
|
|
246 |
this.rdbEffectiveDate.setEnabled(canExport);
|
|
246 |
this.efectivePicker.setEnabled(false);
|
|
247 |
this.rdbEffectiveDate.setEnabled(false);
|
|
247 | 248 |
|
248 | 249 |
this.rdbDontAddToProject.setEnabled(canExport); |
249 | 250 |
this.rdbAddTableToProject.setEnabled(canExport); |
... | ... | |
285 | 286 |
return !StringUtils.isBlank(entity.getGeometryFieldName()); |
286 | 287 |
} |
287 | 288 |
|
289 |
private boolean isLayer(FeatureStore store) { |
|
290 |
FeatureType ft = store.getDefaultFeatureTypeQuietly(); |
|
291 |
if(ft == null){ |
|
292 |
return false; |
|
293 |
} |
|
294 |
return ft.getDefaultGeometryAttribute()!=null; |
|
295 |
} |
|
296 |
|
|
288 | 297 |
@Override |
289 | 298 |
public int export() { |
290 | 299 |
I18nManager i18n = ToolsLocator.getI18nManager(); |
... | ... | |
300 | 309 |
|
301 | 310 |
showMessage(i18n.getTranslation("_Processing"), null); |
302 | 311 |
int res = ERR_OK; |
303 |
// if(chkOverwriteTable.isSelected()){ |
|
304 |
// res = workspace.removeEntity(entity.getEntityCode()); |
|
305 |
// } |
|
306 |
if (res == ERR_OK) { |
|
307 |
res = workspace.export(entity.getEntityName(), |
|
308 |
this.txtTableName.getText(), |
|
309 |
(revision == null) ? null : revision.getRevisionCode(), |
|
310 |
(Timestamp) efectivePicker.get(), |
|
311 |
null |
|
312 |
); |
|
313 |
postExport(res, entity); |
|
314 |
} |
|
312 |
String tableName = this.txtTableName.getText(); |
|
313 |
|
|
314 |
res = workspace.export(entity.getEntityName(), |
|
315 |
tableName, |
|
316 |
(revision == null) ? null : revision.getRevisionCode(), |
|
317 |
DataTypeUtils.toTimestamp(efectivePicker.get()), |
|
318 |
null |
|
319 |
); |
|
320 |
postExport(res, tableName); |
|
315 | 321 |
showMessage(i18n.getTranslation("_Ended_process"), null); |
316 | 322 |
return res; |
317 | 323 |
} finally { |
... | ... | |
340 | 346 |
return this.processing; |
341 | 347 |
} |
342 | 348 |
|
343 |
private void postExport(int checkoutStatus, VCSGisEntity entity) {
|
|
349 |
private void postExport(int checkoutStatus, String tableName) {
|
|
344 | 350 |
if (notInSwingThreadInvokeLater(() -> { |
345 |
postExport(checkoutStatus, entity);
|
|
351 |
postExport(checkoutStatus, tableName);
|
|
346 | 352 |
})) { |
347 | 353 |
return; |
348 | 354 |
} |
... | ... | |
351 | 357 |
final VCSGisWorkspace workspace = this.getWorkspace(); |
352 | 358 |
|
353 | 359 |
if (checkoutStatus == ERR_OK) { |
354 |
FeatureStore store = workspace.getFeatureStore(entity.getEntityName());
|
|
360 |
FeatureStore store = workspace.openFeatureStore(tableName);
|
|
355 | 361 |
if (!rdbDontAddToProject.isSelected()) { |
356 | 362 |
if (rdbAddLayerToView.isSelected()) { |
357 |
if (isLayer(entity)) {
|
|
358 |
String layerName = store.getName(); |
|
359 |
String newLayerName = this.txtTableName.getText();
|
|
363 |
if (isLayer(store)) {
|
|
364 |
// String layerName = store.getName();
|
|
365 |
String newLayerName = tableName;
|
|
360 | 366 |
services.addLayerToView(store, (LabeledValue) cboView.getSelectedItem(), newLayerName); |
361 | 367 |
} |
362 | 368 |
} |
363 | 369 |
if (rdbAddTableToProject.isSelected()) { |
364 |
String layerName = store.getName(); |
|
370 |
// String layerName = store.getName();
|
|
365 | 371 |
String newLayerName = this.txtTableName.getText(); |
366 | 372 |
services.addTableToProject(workspace, store, newLayerName); |
367 | 373 |
} |
org.gvsig.vcsgis/trunk/org.gvsig.vcsgis/org.gvsig.vcsgis.swing/org.gvsig.vcsgis.swing.impl/src/main/java/org/gvsig/vcsgis/swing/impl/VCSGisEntitySelectorControllerImpl.java | ||
---|---|---|
203 | 203 |
for (LabeledValue<VCSGisEntity> entity : entities) { |
204 | 204 |
this.filteredList.getModel().addElement(entity); |
205 | 205 |
} |
206 |
this.changeListeners.fireEvent(); |
|
206 | 207 |
} |
207 | 208 |
|
208 | 209 |
private void doUpdateComponents() { |
Also available in: Unified diff