use of com.revolsys.identifier.Identifier in project com.revolsys.open by revolsys.
the class OsmProxyLayerRecord method getRecordProxied.
@Override
protected LayerRecord getRecordProxied() {
final Identifier identifier = getIdentifier();
final OsmElement record = this.document.getRecord(identifier);
final AbstractRecordLayer layer = getLayer();
return new ArrayLayerRecord(layer, record);
}
use of com.revolsys.identifier.Identifier in project com.revolsys.open by revolsys.
the class AbstractProxyLayerRecord method getRecordProxied.
protected LayerRecord getRecordProxied() {
final AbstractRecordLayer layer = getLayer();
final Identifier identifier = getIdentifier();
final LayerRecord layerRecord = layer.getCachedRecord(identifier);
return layerRecord;
}
use of com.revolsys.identifier.Identifier in project com.revolsys.open by revolsys.
the class RecordStoreLayer method showForm.
@Override
public void showForm(final LayerRecord record, final String fieldName) {
if (record != null) {
final Identifier identifier = getId(record);
if (identifier != null) {
addRecordToCache(getCacheIdForm(), record);
}
final LayerRecord proxyRecord = record.newRecordProxy();
super.showForm(proxyRecord, fieldName);
}
}
use of com.revolsys.identifier.Identifier in project com.revolsys.open by revolsys.
the class RecordStoreLayer method newProxyLayerRecordNoId.
protected LayerRecord newProxyLayerRecordNoId(LayerRecord record) {
final AbstractProxyLayerRecord proxyRecord = new NoIdProxyLayerRecord(this, record);
final Identifier identifier2 = proxyRecord.getIdentifier();
if (identifier2 != null) {
this.recordsByIdentifier.put(identifier2, (RecordStoreLayerRecord) record);
}
record = proxyRecord;
return record;
}
use of com.revolsys.identifier.Identifier in project com.revolsys.open by revolsys.
the class RecordStoreLayer method removeRecordFromCache.
@Override
protected boolean removeRecordFromCache(final Label cacheId, final LayerRecord record) {
boolean removed = false;
if (isLayerRecord(record)) {
final Identifier identifier = record.getIdentifier();
if (identifier != null) {
synchronized (getSync()) {
removed = Maps.removeFromSet(this.recordIdentifiersByCacheId, cacheId, identifier);
}
}
}
removed |= super.removeRecordFromCache(cacheId, record);
return removed;
}
Aggregations