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

org.teamapps.dto.UiCurrencyField 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")
@JsonTypeIdResolver(TeamAppsJacksonTypeIdResolver.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UiCurrencyField extends UiField implements UiTextInputHandlingField, UiObject {


	protected String defaultCurrencyCode;
	protected List currencyCodeList;
	protected int precision = 2;
	protected boolean showCurrencyBeforeAmount;
	protected boolean showCurrencySymbol;
	protected boolean alphaKeysQueryForCurrency = true;

	public UiCurrencyField() {
		super();
	}

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

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("id=" + id).append(", ")
				.append("visible=" + visible).append(", ")
				.append("stylesBySelector=" + stylesBySelector).append(", ")
				.append("editingMode=" + editingMode).append(", ")
				.append("value=" + value).append(", ")
				.append("defaultCurrencyCode=" + defaultCurrencyCode).append(", ")
				.append("currencyCodeList=" + currencyCodeList).append(", ")
				.append("precision=" + precision).append(", ")
				.append("showCurrencyBeforeAmount=" + showCurrencyBeforeAmount).append(", ")
				.append("showCurrencySymbol=" + showCurrencySymbol).append(", ")
				.append("alphaKeysQueryForCurrency=" + alphaKeysQueryForCurrency).append(", ")
				.append(fieldMessages != null ? "fieldMessages={" + fieldMessages.toString() + "}" : "")
				.toString();
	}

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

	@com.fasterxml.jackson.annotation.JsonGetter("currencyCodeList")
	public List getCurrencyCodeList() {
		return currencyCodeList;
	}

	@com.fasterxml.jackson.annotation.JsonGetter("precision")
	public int getPrecision() {
		return precision;
	}

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

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

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

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

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

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

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

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

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

	@com.fasterxml.jackson.annotation.JsonSetter("defaultCurrencyCode")
	public UiCurrencyField setDefaultCurrencyCode(String defaultCurrencyCode) {
		this.defaultCurrencyCode = defaultCurrencyCode;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("currencyCodeList")
	public UiCurrencyField setCurrencyCodeList(List currencyCodeList) {
		this.currencyCodeList = currencyCodeList;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("precision")
	public UiCurrencyField setPrecision(int precision) {
		this.precision = precision;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showCurrencyBeforeAmount")
	public UiCurrencyField setShowCurrencyBeforeAmount(boolean showCurrencyBeforeAmount) {
		this.showCurrencyBeforeAmount = showCurrencyBeforeAmount;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("showCurrencySymbol")
	public UiCurrencyField setShowCurrencySymbol(boolean showCurrencySymbol) {
		this.showCurrencySymbol = showCurrencySymbol;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("alphaKeysQueryForCurrency")
	public UiCurrencyField setAlphaKeysQueryForCurrency(boolean alphaKeysQueryForCurrency) {
		this.alphaKeysQueryForCurrency = alphaKeysQueryForCurrency;
		return this;
	}


	public static class SetDefaultCurrencyCodeCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected String defaultCurrencyCode;

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

		public SetDefaultCurrencyCodeCommand(String componentId, String defaultCurrencyCode) {
			this.componentId = componentId;
			this.defaultCurrencyCode = defaultCurrencyCode;
		}

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

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

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

	}

	public static class SetCurrencyCodeListCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected List currencyCodeList;

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

		public SetCurrencyCodeListCommand(String componentId, List currencyCodeList) {
			this.componentId = componentId;
			this.currencyCodeList = currencyCodeList;
		}

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

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

		@com.fasterxml.jackson.annotation.JsonGetter("currencyCodeList")
		public List getCurrencyCodeList() {
			return currencyCodeList;
		}

	}

	public static class SetShowCurrencyBeforeAmountCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected boolean showCurrencyBeforeAmount;

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

		public SetShowCurrencyBeforeAmountCommand(String componentId, boolean showCurrencyBeforeAmount) {
			this.componentId = componentId;
			this.showCurrencyBeforeAmount = showCurrencyBeforeAmount;
		}

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

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

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

	}

	public static class SetShowCurrencySymbolCommand implements UiCommand {

		@UiComponentId protected String componentId;
		protected boolean showCurrencySymbol;

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

		public SetShowCurrencySymbolCommand(String componentId, boolean showCurrencySymbol) {
			this.componentId = componentId;
			this.showCurrencySymbol = showCurrencySymbol;
		}

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

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

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

	}




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy