Revision 2324 org.gvsig.cvsgis/trunk/org.gvsig.cvsgis/org.gvsig.cvsgis.lib/org.gvsig.cvsgis.lib.impl/src/main/java/org/gvsig/cvsgis/client/tables/ChangesTable.java
ChangesTable.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
public static final String TABLE_NAME = "CVSGIS_CHANGES"; |
35 | 35 |
|
36 |
private static final String COD_CHANGE = "cod_change";
|
|
37 |
private static final String COD_ENTITY = "cod_entity";
|
|
38 |
private static final String SELECTED = "chg_selected";
|
|
39 |
private static final String FEATUREID = "chg_featureid";
|
|
40 |
private static final String OPERATION = "chg_operation";
|
|
36 |
private static final String COD_CHANGE = "COD_CHANGE";
|
|
37 |
private static final String COD_ENTITY = "COD_ENTITY";
|
|
38 |
private static final String SELECTED = "CHG_SELECTED";
|
|
39 |
private static final String FEATUREID = "CHG_FEATURECODE";
|
|
40 |
private static final String OPERATION = "CHG_OPERATION";
|
|
41 | 41 |
|
42 | 42 |
@SuppressWarnings("UseSpecificCatch") |
43 | 43 |
public static class ChangeRow extends AbstractRow { |
... | ... | |
89 | 89 |
entityName = this.getEntity().getEntityName(); |
90 | 90 |
code = this.getFeatureCode(); |
91 | 91 |
FeatureStore store = workspace.getFeatureStore(entityName); |
92 |
Feature f = store.findFirst("\""+this.getEntity().getPrimaryKeyFieldName()+"\"='"+code+"'");
|
|
92 |
Feature f = store.findFirst("\""+this.getEntity().getDataCodeFieldName()+"\"='"+code+"'");
|
|
93 | 93 |
if( f==null ) { |
94 | 94 |
throw new RuntimeException("Feature '"+entityName+"/"+code+"'not found."); |
95 | 95 |
} |
... | ... | |
106 | 106 |
entityName = this.getEntity().getEntityName(); |
107 | 107 |
code = this.getFeatureCode(); |
108 | 108 |
FeatureStore store = workspace.getFeatureStore(entityName); |
109 |
Feature f = store.findFirst("\""+this.getEntity().getPrimaryKeyFieldName()+"\"='"+code+"'");
|
|
109 |
Feature f = store.findFirst("\""+this.getEntity().getDataCodeFieldName()+"\"='"+code+"'");
|
|
110 | 110 |
if( f==null ) { |
111 | 111 |
throw new RuntimeException("Feature '"+entityName+"/"+code+"'not found."); |
112 | 112 |
} |
... | ... | |
226 | 226 |
} |
227 | 227 |
} |
228 | 228 |
|
229 |
public ChangeRow getByEntityAndRelatedFeatureCode(
|
|
229 |
public ChangeRow getByEntityAndDataCode(
|
|
230 | 230 |
CvsGisWorkspaceEx workspace, |
231 | 231 |
String entityCode, |
232 | 232 |
String featureCode |
... | ... | |
302 | 302 |
.setSize(40) |
303 | 303 |
.setLabel("Identifier") |
304 | 304 |
.setDescription("The identifier of the feature"); |
305 |
ft.add(OPERATION, DataTypes.STRING) |
|
306 |
.setSize(200) |
|
305 |
ft.add(OPERATION, DataTypes.INTEGER) |
|
307 | 306 |
.setLabel("Operation") |
308 | 307 |
.setAvailableValues(new DynObjectValueItem[] { |
309 | 308 |
new DynObjectValueItem(OP_ADD_ENTITY, "Add entity"), |
Also available in: Unified diff