run.halo.app.extension.index.query.IsNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
API of halo project, connecting by other projects.
The newest version!
package run.halo.app.extension.index.query;
import java.util.NavigableSet;
public class IsNull extends SimpleQuery {
protected IsNull(String fieldName) {
super(fieldName, null);
}
@Override
public NavigableSet matches(QueryIndexView indexView) {
indexView.acquireReadLock();
try {
var allIds = indexView.getAllIds();
var idsForNonNullValue = indexView.getIdsForField(fieldName);
allIds.removeAll(idsForNonNullValue);
return allIds;
} finally {
indexView.releaseReadLock();
}
}
@Override
public String toString() {
return fieldName + " IS NULL";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy