prompto.store.IAuditMetadata Maven / Gradle / Ivy
The newest version!
package prompto.store;
import java.time.LocalDateTime;
import java.util.Map;
import prompto.intrinsic.IDocumentProducer;
import prompto.intrinsic.PromptoDbId;
public interface IAuditMetadata extends Map, IDocumentProducer {
default void setAuditMetadataId(PromptoDbId id) {
put("auditMetadataId", id.getValue());
}
default PromptoDbId getAuditMetadataId(IStore store) {
return store.convertToDbId(get("auditMetadataId"));
}
default void setUTCTimestamp(LocalDateTime timeStamp) {
put("timeStamp", timeStamp);
}
default LocalDateTime getUTCTimestamp() {
return get("timeStamp", LocalDateTime.class);
}
default void setLogin(String login) {
put("login", login);
}
default String getLogin() {
Object login = get("login");
return login instanceof String ? (String)login : "";
}
@SuppressWarnings("unchecked")
default T get(String fieldName, Class resultClass) {
return (T)get(fieldName);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy