
com.liferay.headless.delivery.dto.v1_0.EmptyCollectionConfig Maven / Gradle / Ivy
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.headless.delivery.dto.v1_0;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.liferay.petra.function.UnsafeSupplier;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLField;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLName;
import com.liferay.portal.vulcan.util.ObjectMapperUtil;
import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
/**
* @author Javier Gamarra
* @generated
*/
@Generated("")
@GraphQLName("EmptyCollectionConfig")
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "EmptyCollectionConfig")
public class EmptyCollectionConfig implements Serializable {
public static EmptyCollectionConfig toDTO(String json) {
return ObjectMapperUtil.readValue(EmptyCollectionConfig.class, json);
}
public static EmptyCollectionConfig unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(
EmptyCollectionConfig.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "Whether to display a message when the collection is empty or no results match the applied filters (true by default)."
)
public Boolean getDisplayMessage() {
if (_displayMessageSupplier != null) {
displayMessage = _displayMessageSupplier.get();
_displayMessageSupplier = null;
}
return displayMessage;
}
public void setDisplayMessage(Boolean displayMessage) {
this.displayMessage = displayMessage;
_displayMessageSupplier = null;
}
@JsonIgnore
public void setDisplayMessage(
UnsafeSupplier displayMessageUnsafeSupplier) {
_displayMessageSupplier = () -> {
try {
return displayMessageUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "Whether to display a message when the collection is empty or no results match the applied filters (true by default)."
)
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected Boolean displayMessage;
@JsonIgnore
private Supplier _displayMessageSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The localized message to display when the collection is empty or no results match the applied filters ('No Results Found' by default)."
)
@Valid
public Map getMessage_i18n() {
if (_message_i18nSupplier != null) {
message_i18n = _message_i18nSupplier.get();
_message_i18nSupplier = null;
}
return message_i18n;
}
public void setMessage_i18n(Map message_i18n) {
this.message_i18n = message_i18n;
_message_i18nSupplier = null;
}
@JsonIgnore
public void setMessage_i18n(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy