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

org.jsimpledb.SetElementIndexInfo Maven / Gradle / Ivy

The newest version!

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

package org.jsimpledb;

import org.jsimpledb.core.ObjId;
import org.jsimpledb.core.Transaction;
import org.jsimpledb.core.type.ReferenceFieldType;

/**
 * Represents an index on the {@code element} sub-field of a {@link JSetField}.
 */
class SetElementIndexInfo extends ComplexSubFieldIndexInfo {

    SetElementIndexInfo(JSetField jfield) {
        super(jfield.elementField);
    }

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy