use of org.locationtech.geowave.core.store.data.visibility.UnconstrainedVisibilityHandler in project geowave by locationtech.
the class LegacyInternalDataAdapterWrapper method fromBinary.
@SuppressWarnings("unchecked")
@Override
public void fromBinary(final byte[] bytes) {
ByteBuffer buffer = ByteBuffer.wrap(bytes);
adapterId = buffer.getShort();
byte[] adapterBytes = new byte[buffer.remaining()];
buffer.get(adapterBytes);
adapter = (DataTypeAdapter<T>) PersistenceUtils.fromBinary(adapterBytes);
VisibilityHandler visibilityHandler = new UnconstrainedVisibilityHandler();
if (adapter instanceof LegacyFeatureDataAdapter) {
visibilityHandler = ((LegacyFeatureDataAdapter) adapter).getVisibilityHandler();
adapter = (DataTypeAdapter<T>) ((LegacyFeatureDataAdapter) adapter).getUpdatedAdapter();
}
this.updatedAdapter = adapter.asInternalAdapter(adapterId, visibilityHandler);
}
Aggregations