use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordStoreLayerTest method testNewRecordSaveChanges.
@Test
public void testNewRecordSaveChanges() {
final LayerRecord testRecord = testNewRecord();
this.layer.saveChanges();
final List<LayerRecord> records2 = assertGetRecords(1);
final LayerRecord actualRecord = assertRecordAtIndex(1, records2, 0, testRecord, IdentifierProxyLayerRecord.class);
assertRecordCounts(0, 1, 0, 0);
assertRecordState(testRecord, RecordState.PERSISTED);
assertRecordState(actualRecord, RecordState.PERSISTED);
Assert.assertFalse("Has Changes", this.layer.isHasChanges());
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordStoreLayerTest method testNewRecordCancelChanges.
@Test
public void testNewRecordCancelChanges() {
final LayerRecord testRecord = testNewRecord();
this.layer.cancelChanges();
assertRecordCounts(0, 0, 0, 0);
assertRecordState(testRecord, RecordState.DELETED);
Assert.assertFalse("Has Changes", this.layer.isHasChanges());
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class RecordStoreLayerTest method testNewRecordDelete.
@Test
public void testNewRecordDelete() {
final LayerRecord testRecord = testNewRecord();
this.layer.deleteRecord(testRecord);
assertRecordCounts(0, 0, 0, 0);
assertRecordState(testRecord, RecordState.DELETED);
Assert.assertFalse("Has Changes", this.layer.isHasChanges());
}
use of com.revolsys.swing.map.layer.record.LayerRecord in project com.revolsys.open by revolsys.
the class DeleteLayerRecordUndo method undoDo.
@Override
protected void undoDo() {
if (this.record == null && this.layer != null) {
final LayerRecord newRecord = this.layer.newLayerRecord(this.originalValues);
this.layer.saveChanges(newRecord);
this.layer.addSelectedRecords(newRecord);
this.record = newRecord;
}
}
Aggregations