Search in sources :

Example 1 with CompactInternalGenericRecord

use of com.hazelcast.internal.serialization.impl.compact.CompactInternalGenericRecord in project hazelcast by hazelcast.

the class CompactGetter method getValue.

@Override
Object getValue(Object target, String fieldPath) throws Exception {
    InternalGenericRecord record;
    if (target instanceof CompactInternalGenericRecord) {
        record = (InternalGenericRecord) target;
    } else {
        record = serializationService.readAsInternalGenericRecord((Data) target);
    }
    GenericRecordQueryReader reader = new GenericRecordQueryReader(record);
    return reader.read(fieldPath);
}
Also used : CompactInternalGenericRecord(com.hazelcast.internal.serialization.impl.compact.CompactInternalGenericRecord) GenericRecordQueryReader(com.hazelcast.internal.serialization.impl.GenericRecordQueryReader) Data(com.hazelcast.internal.serialization.Data) CompactInternalGenericRecord(com.hazelcast.internal.serialization.impl.compact.CompactInternalGenericRecord) InternalGenericRecord(com.hazelcast.internal.serialization.impl.InternalGenericRecord)

Aggregations

Data (com.hazelcast.internal.serialization.Data)1 GenericRecordQueryReader (com.hazelcast.internal.serialization.impl.GenericRecordQueryReader)1 InternalGenericRecord (com.hazelcast.internal.serialization.impl.InternalGenericRecord)1 CompactInternalGenericRecord (com.hazelcast.internal.serialization.impl.compact.CompactInternalGenericRecord)1