Revision 44363 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/DefaultForeingKey.java
DefaultForeingKey.java | ||
---|---|---|
135 | 135 |
private String tableName; |
136 | 136 |
private String codeName; |
137 | 137 |
private DynObjectValueItem[] availableValues; |
138 |
|
|
138 |
private boolean ensureReferentialIntegrity; |
|
139 | 139 |
private FeatureAttributeDescriptor descriptor; |
140 | 140 |
|
141 | 141 |
public DefaultForeingKey() { |
142 |
|
|
142 |
this.foreingKey = false; |
|
143 |
this.closedList = false; |
|
144 |
this.tableName = null; |
|
145 |
this.codeName = null; |
|
146 |
this.labelFormula = null; |
|
147 |
this.ensureReferentialIntegrity = false; |
|
143 | 148 |
} |
144 | 149 |
|
145 | 150 |
public void setDescriptor(FeatureAttributeDescriptor descriptor) { |
... | ... | |
215 | 220 |
this.tableName = null; |
216 | 221 |
this.codeName = null; |
217 | 222 |
this.labelFormula = null; |
223 |
this.ensureReferentialIntegrity = false; |
|
218 | 224 |
} |
219 | 225 |
|
220 | 226 |
private void disposeIfLocalContext(ContextForeingKey context) { |
... | ... | |
422 | 428 |
return this.availableValues; |
423 | 429 |
} |
424 | 430 |
|
431 |
@Override |
|
425 | 432 |
public String getLabelForValue(Object value) { |
426 | 433 |
DynObjectValueItem[] values = this.getAvailableValues(null); |
427 | 434 |
if( values != null ) { |
... | ... | |
442 | 449 |
labelFormula = state.getString("labelFormula"); |
443 | 450 |
codeName = state.getString("codeName"); |
444 | 451 |
tableName = state.getString("tableName"); |
452 |
ensureReferentialIntegrity = state.getBoolean("ensureReferentialIntegrity"); |
|
445 | 453 |
} |
446 | 454 |
|
447 | 455 |
@Override |
... | ... | |
451 | 459 |
state.set("labelFormula", labelFormula); |
452 | 460 |
state.set("codeName", codeName); |
453 | 461 |
state.set("tableName", tableName); |
462 |
state.set("ensureReferentialIntegrity", ensureReferentialIntegrity); |
|
454 | 463 |
} |
455 | 464 |
|
456 | 465 |
private static final String FOREINGKEY_PERSISTENCE_DEFINITION_NAME = "ForeingKey"; |
... | ... | |
472 | 481 |
definition.addDynFieldString("LabelFormula"); |
473 | 482 |
definition.addDynFieldString("codeName"); |
474 | 483 |
definition.addDynFieldString("tableName"); |
484 |
definition.addDynFieldBoolean("ensureReferentialIntegrity"); |
|
475 | 485 |
} |
476 | 486 |
} |
477 | 487 |
|
... | ... | |
481 | 491 |
return other; |
482 | 492 |
} |
483 | 493 |
|
494 |
@Override |
|
495 |
public boolean getEnsureReferentialIntegrity() { |
|
496 |
return this.ensureReferentialIntegrity; |
|
497 |
} |
|
498 |
|
|
499 |
@Override |
|
500 |
public void setEnsureReferentialIntegrity(boolean ensureReferentialIntegrity) { |
|
501 |
this.ensureReferentialIntegrity = ensureReferentialIntegrity; |
|
502 |
} |
|
503 |
|
|
504 |
|
|
505 |
|
|
484 | 506 |
} |
Also available in: Unified diff