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

org.teamapps.dto.UiValueMatcher 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 UiValueMatcher implements UiObject {

	public enum Comparator {
		EQUALS, LESSER, LESSER_EQUALS, GREATER, GREATER_EQUALS, CONTAINS, STARTS_WITH, ENDS_WITH, MINIMUM_SIZE, MAXIMUM_SIZE, REGEX_MATCH, CONTAINS_REGEX, CONTAINS_SCRIPT, CONTAINS_SCRIPT_TYPE, CONTAINS_ONLY_SCRIPT_TYPE;

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

	protected Comparator comparator;
	protected boolean caseSensitive = false;
	protected boolean invertMatch;

	@JsonSerialize(using = ObjectSerializer.class)
	@JsonDeserialize(using = ObjectDeserializer.class)
	protected Object compareValue;

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

	public UiValueMatcher(Comparator comparator, Object compareValue) {
		this.comparator = comparator;
		this.compareValue = compareValue;
	}

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

	@SuppressWarnings("unchecked")
	public String toString() {
		return new StringBuilder(getClass().getSimpleName()).append(": ")
				.append("comparator=" + comparator).append(", ")
				.append("caseSensitive=" + caseSensitive).append(", ")
				.append("invertMatch=" + invertMatch).append(", ")
				.append("compareValue=" + compareValue)
				.toString();
	}

	@com.fasterxml.jackson.annotation.JsonGetter("comparator")
	public Comparator getComparator() {
		return comparator;
	}

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

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

	@com.fasterxml.jackson.annotation.JsonGetter("compareValue")
	public Object getCompareValue() {
		return compareValue;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("caseSensitive")
	public UiValueMatcher setCaseSensitive(boolean caseSensitive) {
		this.caseSensitive = caseSensitive;
		return this;
	}

	@com.fasterxml.jackson.annotation.JsonSetter("invertMatch")
	public UiValueMatcher setInvertMatch(boolean invertMatch) {
		this.invertMatch = invertMatch;
		return this;
	}






}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy