All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.permazen.MapKeyIndexInfo Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package io.permazen;

import io.permazen.core.ObjId;
import io.permazen.core.Transaction;
import io.permazen.core.type.ReferenceFieldType;

/**
 * Represents an index on the {@code key} sub-field of a {@link JMapField}.
 */
class MapKeyIndexInfo extends ComplexSubFieldIndexInfo {

    MapKeyIndexInfo(JMapField jfield) {
        super(jfield.keyField);
    }

    @Override
    protected Iterable iterateReferences(Transaction tx, ObjId id) {
        assert this.getFieldType() instanceof ReferenceFieldType;
        return tx.readMapField(id, this.getParentStorageId(), false).keySet();
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy