io.polyglotted.pgmodel.search.DocStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pg-model Show documentation
Show all versions of pg-model Show documentation
Standard set of models for geo coding, access control and elastic search abstraction
The newest version!
package io.polyglotted.pgmodel.search;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
public enum DocStatus {
LIVE, EXPIRED, DELETED, PENDING, PENDING_DELETE, REJECTED, DISCARDED;
private static final Map STATUS_MAP = buildStatusMap();
public static DocStatus fromStatus(String status) {
return STATUS_MAP.get(status);
}
private static Map buildStatusMap() {
ImmutableMap.Builder builder = ImmutableMap.builder();
for (DocStatus status : values()) {
builder.put(status.name(), status);
builder.put(status.name().toLowerCase(), status);
}
return builder.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy