Revision 3310 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
WorkspaceChangesTable.java | ||
---|---|---|
278 | 278 |
} |
279 | 279 |
|
280 | 280 |
public DisposableFeatureSetIterable getByOperation(VCSGisWorkspace workspace, int op) { |
281 |
return getByOperation(workspace, null, op); |
|
282 |
// FeatureStore store = null; |
|
283 |
// try { |
|
284 |
// store = workspace.getFeatureStore(TABLE_NAME); |
|
285 |
// FeatureQuery query = store.createFeatureQuery(); |
|
286 |
// query.addFilter("\""+WorkspaceChangesTable.OPERATION+"\"="+op); |
|
287 |
// query.retrievesAllAttributes(); |
|
288 |
// DisposableFeatureSetIterable changes = store.getFeatureSet(query).iterable(); |
|
289 |
// return changes; |
|
290 |
// } catch (Exception ex) { |
|
291 |
// throw new RuntimeException("Can't retrieve changes for operartion "+op+".", ex); |
|
292 |
// } finally { |
|
293 |
// if( store!=null ) { |
|
294 |
// DisposeUtils.dispose(store); |
|
295 |
// } |
|
296 |
// } |
|
297 |
} |
|
298 |
|
|
299 |
public DisposableFeatureSetIterable getByOperation(VCSGisWorkspace workspace, String entityCode, int op) { |
|
281 | 300 |
FeatureStore store = null; |
282 | 301 |
try { |
283 | 302 |
store = workspace.getFeatureStore(TABLE_NAME); |
284 | 303 |
FeatureQuery query = store.createFeatureQuery(); |
285 |
query.addFilter("\""+WorkspaceChangesTable.OPERATION+"\"="+op); |
|
304 |
if( !StringUtils.isBlank(entityCode) ) { |
|
305 |
query.addFilter("\""+COD_ENTITY+"\" ='"+entityCode+"' AND \""+WorkspaceChangesTable.OPERATION+"\"="+op); |
|
306 |
} else { |
|
307 |
query.addFilter("\""+WorkspaceChangesTable.OPERATION+"\"="+op); |
|
308 |
} |
|
309 |
|
|
286 | 310 |
query.retrievesAllAttributes(); |
287 | 311 |
DisposableFeatureSetIterable changes = store.getFeatureSet(query).iterable(); |
288 | 312 |
return changes; |
... | ... | |
295 | 319 |
} |
296 | 320 |
} |
297 | 321 |
|
322 |
|
|
298 | 323 |
public DisposableFeatureSetIterable getGroupedByEntity(VCSGisWorkspace workspace) { |
299 | 324 |
FeatureStore store = null; |
300 | 325 |
try { |
Also available in: Unified diff