All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.teamapps.dto.UiLocalDateField Maven / Gradle / Ivy

There is a newer version: 0.9.194
Show newest version
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", defaultImpl = UiLocalDateField.class)
public class UiLocalDateField extends UiField implements UiObject {

	public enum DropDownMode {
		CALENDAR, CALENDAR_SUGGESTION_LIST, SUGGESTION_LIST;

		@com.fasterxml.jackson.annotation.JsonValue
		public int jsonValue() {
			return ordinal();
		}
	}

	protected boolean showDropDownButton = true;
	protected boolean showClearButton;
	protected boolean favorPastDates = false;
	protected String locale;
	protected UiDateTimeFormatDescriptor dateFormat = null;
	protected UiLocalDate defaultSuggestionDate;
	protected boolean shuffledFormatSuggestionsEnabled;
	protected DropDownMode dropDownMode = DropDownMode.CALENDAR_SUGGESTION_LIST;
	protected String placeholderText;
	protected boolean calendarIconEnabled;

	public UiLocalDateField() {
		super();
	}

	@com.fasterxml.jackson.annotation.JsonIgnore
	public UiObjectType getUiObjectType() {
		return UiObjectType.UI_LOCAL_DATE_FIELD;
	}

	@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("showClearButton=" + showClearButton).append(", ")
				.append("favorPastDates=" + favorPastDates).append(", ")
				.append("locale=" + locale).append(", ")
				.append("shuffledFormatSuggestionsEnabled=" + shuffledFormatSuggestionsEnabled).append(", ")
				.append("dropDownMode=" + dropDownMode).append(", ")
				.append("placeholderText=" + placeholderText).append(", ")
				.append("calendarIconEnabled=" + calendarIconEnabled).append(", ")
				.append(fieldMessages != null ? "fieldMessages={" + fieldMessages.toString() + "}" : "").append(", ")
				.append(dateFormat != null ? "dateFormat={" + dateFormat.toString() + "}" : "").append(", ")
				.append(defaultSuggestionDate != null ? "defaultSuggestionDate={" + defaultSuggestionDate.toString() + "}" : "")
				.toString();
	}

	@com.fasterxml.jackson.annotation.JsonGetter("showDropDownButton")
	public boolean getShowDropDownButton() {
		return showDropDownButton;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("showClearButton")
	public boolean getShowClearButton() {
		return showClearButton;
	}

	@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("defaultSuggestionDate")
	public UiLocalDate getDefaultSuggestionDate() {
		return defaultSuggestionDate;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("shuffledFormatSuggestionsEnabled")
	public boolean getShuffledFormatSuggestionsEnabled() {
		return shuffledFormatSuggestionsEnabled;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("dropDownMode")
	public DropDownMode getDropDownMode() {
		return dropDownMode;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("placeholderText")
	public String getPlaceholderText() {
		return placeholderText;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("calendarIconEnabled")
	public boolean getCalendarIconEnabled() {
		return calendarIconEnabled;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("id")
	public UiLocalDateField setId(String id) {
		this.id = id;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("debuggingId")
	public UiLocalDateField setDebuggingId(String debuggingId) {
		this.debuggingId = debuggingId;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("visible")
	public UiLocalDateField setVisible(boolean visible) {
		this.visible = visible;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("stylesBySelector")
	public UiLocalDateField setStylesBySelector(Map> stylesBySelector) {
		this.stylesBySelector = stylesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("classNamesBySelector")
	public UiLocalDateField setClassNamesBySelector(Map> classNamesBySelector) {
		this.classNamesBySelector = classNamesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("attributesBySelector")
	public UiLocalDateField setAttributesBySelector(Map> attributesBySelector) {
		this.attributesBySelector = attributesBySelector;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("editingMode")
	public UiLocalDateField setEditingMode(UiFieldEditingMode editingMode) {
		this.editingMode = editingMode;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("value")
	public UiLocalDateField setValue(Object value) {
		this.value = value;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("fieldMessages")
	public UiLocalDateField setFieldMessages(List fieldMessages) {
		this.fieldMessages = fieldMessages;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showDropDownButton")
	public UiLocalDateField setShowDropDownButton(boolean showDropDownButton) {
		this.showDropDownButton = showDropDownButton;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showClearButton")
	public UiLocalDateField setShowClearButton(boolean showClearButton) {
		this.showClearButton = showClearButton;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("favorPastDates")
	public UiLocalDateField setFavorPastDates(boolean favorPastDates) {
		this.favorPastDates = favorPastDates;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("locale")
	public UiLocalDateField setLocale(String locale) {
		this.locale = locale;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("dateFormat")
	public UiLocalDateField setDateFormat(UiDateTimeFormatDescriptor dateFormat) {
		this.dateFormat = dateFormat;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("defaultSuggestionDate")
	public UiLocalDateField setDefaultSuggestionDate(UiLocalDate defaultSuggestionDate) {
		this.defaultSuggestionDate = defaultSuggestionDate;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("shuffledFormatSuggestionsEnabled")
	public UiLocalDateField setShuffledFormatSuggestionsEnabled(boolean shuffledFormatSuggestionsEnabled) {
		this.shuffledFormatSuggestionsEnabled = shuffledFormatSuggestionsEnabled;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("dropDownMode")
	public UiLocalDateField setDropDownMode(DropDownMode dropDownMode) {
		this.dropDownMode = dropDownMode;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("placeholderText")
	public UiLocalDateField setPlaceholderText(String placeholderText) {
		this.placeholderText = placeholderText;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("calendarIconEnabled")
	public UiLocalDateField setCalendarIconEnabled(boolean calendarIconEnabled) {
		this.calendarIconEnabled = calendarIconEnabled;
		return this;
	}



	public static class UpdateCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected UiLocalDateField config;

		/**
		 * @deprecated Only for Jackson deserialization. Use the other constructor instead.
		 */
		@Deprecated
		public UpdateCommand() {
			// default constructor for Jackson
		}

		public UpdateCommand(String componentId, UiLocalDateField config) {
			this.componentId = componentId;
			this.config = config;
		}

		@SuppressWarnings("unchecked")
		public String toString() {
			return new StringBuilder(getClass().getSimpleName()).append(": ")
					.append("componentId=" + componentId).append(", ")
					.append(config != null ? "config={" + config.toString() + "}" : "")
					.toString();
		}

		@com.fasterxml.jackson.annotation.JsonGetter("componentId")
		public String getComponentId() {
			return componentId;
		}

		@com.fasterxml.jackson.annotation.JsonGetter("config")
		public UiLocalDateField getConfig() {
			return config;
		}

	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy