
com.aerospike.dsl.model.BasePath Maven / Gradle / Ivy
The newest version!
package com.aerospike.dsl.model;
import com.aerospike.client.exp.Exp;
import lombok.Getter;
import java.util.List;
@Getter
public class BasePath extends AbstractPart {
private final BinPart binPart;
private final List parts;
public BasePath(BinPart binOperand, List parts) {
super(PartType.BASE_PATH);
this.binPart = binOperand;
this.parts = parts;
}
// Bin type is determined by the base path's first element
public Exp.Type getBinType() {
if (!parts.isEmpty()) {
return switch (parts.get(0).partType) {
case MAP_PART -> Exp.Type.MAP;
case LIST_PART -> Exp.Type.LIST;
default -> null;
};
}
return binPart.expType;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy