org.teamapps.dto.AbstractUiDateTimeField Maven / Gradle / Ivy
package org.teamapps.dto;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
/**
* THIS IS GENERATED CODE!
* PLEASE DO NOT MODIFY - ALL YOUR WORK WOULD BE LOST!
*/
@JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "_type")
@JsonTypeIdResolver(TeamAppsJacksonTypeIdResolver.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public abstract class AbstractUiDateTimeField extends UiField implements UiObject {
protected boolean showDropDownButton = true;
protected boolean favorPastDates = false;
protected String locale;
protected UiDateTimeFormatDescriptor dateFormat = null;
protected UiDateTimeFormatDescriptor timeFormat = null;
public AbstractUiDateTimeField() {
super();
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("id=" + id).append(", ")
.append("debuggingId=" + debuggingId).append(", ")
.append("classNamesBySelector=" + classNamesBySelector).append(", ")
.append("visible=" + visible).append(", ")
.append("stylesBySelector=" + stylesBySelector).append(", ")
.append("attributesBySelector=" + attributesBySelector).append(", ")
.append("editingMode=" + editingMode).append(", ")
.append("value=" + value).append(", ")
.append("showDropDownButton=" + showDropDownButton).append(", ")
.append("favorPastDates=" + favorPastDates).append(", ")
.append("locale=" + locale).append(", ")
.append(fieldMessages != null ? "fieldMessages={" + fieldMessages.toString() + "}" : "").append(", ")
.append(dateFormat != null ? "dateFormat={" + dateFormat.toString() + "}" : "").append(", ")
.append(timeFormat != null ? "timeFormat={" + timeFormat.toString() + "}" : "")
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("showDropDownButton")
public boolean getShowDropDownButton() {
return showDropDownButton;
}
@com.fasterxml.jackson.annotation.JsonGetter("favorPastDates")
public boolean getFavorPastDates() {
return favorPastDates;
}
@com.fasterxml.jackson.annotation.JsonGetter("locale")
public String getLocale() {
return locale;
}
@com.fasterxml.jackson.annotation.JsonGetter("dateFormat")
public UiDateTimeFormatDescriptor getDateFormat() {
return dateFormat;
}
@com.fasterxml.jackson.annotation.JsonGetter("timeFormat")
public UiDateTimeFormatDescriptor getTimeFormat() {
return timeFormat;
}
@com.fasterxml.jackson.annotation.JsonSetter("id")
public AbstractUiDateTimeField setId(String id) {
this.id = id;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
public AbstractUiDateTimeField setDebuggingId(String debuggingId) {
this.debuggingId = debuggingId;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("visible")
public AbstractUiDateTimeField setVisible(boolean visible) {
this.visible = visible;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
public AbstractUiDateTimeField setStylesBySelector(Map> stylesBySelector) {
this.stylesBySelector = stylesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
public AbstractUiDateTimeField setClassNamesBySelector(Map> classNamesBySelector) {
this.classNamesBySelector = classNamesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
public AbstractUiDateTimeField setAttributesBySelector(Map> attributesBySelector) {
this.attributesBySelector = attributesBySelector;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("editingMode")
public AbstractUiDateTimeField setEditingMode(UiFieldEditingMode editingMode) {
this.editingMode = editingMode;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("value")
public AbstractUiDateTimeField setValue(Object value) {
this.value = value;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("fieldMessages")
public AbstractUiDateTimeField setFieldMessages(List fieldMessages) {
this.fieldMessages = fieldMessages;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("showDropDownButton")
public AbstractUiDateTimeField setShowDropDownButton(boolean showDropDownButton) {
this.showDropDownButton = showDropDownButton;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("favorPastDates")
public AbstractUiDateTimeField setFavorPastDates(boolean favorPastDates) {
this.favorPastDates = favorPastDates;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("locale")
public AbstractUiDateTimeField setLocale(String locale) {
this.locale = locale;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("dateFormat")
public AbstractUiDateTimeField setDateFormat(UiDateTimeFormatDescriptor dateFormat) {
this.dateFormat = dateFormat;
return this;
}
@com.fasterxml.jackson.annotation.JsonSetter("timeFormat")
public AbstractUiDateTimeField setTimeFormat(UiDateTimeFormatDescriptor timeFormat) {
this.timeFormat = timeFormat;
return this;
}
public static class SetShowDropDownButtonCommand implements UiCommand {
@UiComponentId protected String componentId;
protected boolean showDropDownButton;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetShowDropDownButtonCommand() {
// default constructor for Jackson
}
public SetShowDropDownButtonCommand(String componentId, boolean showDropDownButton) {
this.componentId = componentId;
this.showDropDownButton = showDropDownButton;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("showDropDownButton=" + showDropDownButton)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("showDropDownButton")
public boolean getShowDropDownButton() {
return showDropDownButton;
}
}
public static class SetFavorPastDatesCommand implements UiCommand {
@UiComponentId protected String componentId;
protected boolean favorPastDates;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetFavorPastDatesCommand() {
// default constructor for Jackson
}
public SetFavorPastDatesCommand(String componentId, boolean favorPastDates) {
this.componentId = componentId;
this.favorPastDates = favorPastDates;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("favorPastDates=" + favorPastDates)
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("favorPastDates")
public boolean getFavorPastDates() {
return favorPastDates;
}
}
public static class SetLocaleAndFormatsCommand implements UiCommand {
@UiComponentId protected String componentId;
protected String locale;
protected UiDateTimeFormatDescriptor dateFormat;
protected UiDateTimeFormatDescriptor timeFormat;
/**
* @deprecated Only for Jackson deserialization. Use the other constructor instead.
*/
@Deprecated
public SetLocaleAndFormatsCommand() {
// default constructor for Jackson
}
public SetLocaleAndFormatsCommand(String componentId, String locale, UiDateTimeFormatDescriptor dateFormat, UiDateTimeFormatDescriptor timeFormat) {
this.componentId = componentId;
this.locale = locale;
this.dateFormat = dateFormat;
this.timeFormat = timeFormat;
}
@SuppressWarnings("unchecked")
public String toString() {
return new StringBuilder(getClass().getSimpleName()).append(": ")
.append("componentId=" + componentId).append(", ")
.append("locale=" + locale).append(", ")
.append(dateFormat != null ? "dateFormat={" + dateFormat.toString() + "}" : "").append(", ")
.append(timeFormat != null ? "timeFormat={" + timeFormat.toString() + "}" : "")
.toString();
}
@com.fasterxml.jackson.annotation.JsonGetter("componentId")
public String getComponentId() {
return componentId;
}
@com.fasterxml.jackson.annotation.JsonGetter("locale")
public String getLocale() {
return locale;
}
@com.fasterxml.jackson.annotation.JsonGetter("dateFormat")
public UiDateTimeFormatDescriptor getDateFormat() {
return dateFormat;
}
@com.fasterxml.jackson.annotation.JsonGetter("timeFormat")
public UiDateTimeFormatDescriptor getTimeFormat() {
return timeFormat;
}
}
}