import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "className"
)
@JsonSubTypes({
@JsonSubTypes.Type(value = FieldBaseForSearchMatrixDto.class, name = "FieldBaseForSearchMatrixDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchIntDto.class, name = "FieldBaseForSearchIntDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchDoubleDto.class, name = "FieldBaseForSearchDoubleDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchConservazioneDto.class, name = "FieldBaseForSearchConservazioneDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchContactDto.class, name = "FieldBaseForSearchContactDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchDocumentTypeDto.class, name = "FieldBaseForSearchDocumentTypeDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchStampDto.class, name = "FieldBaseForSearchStampDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchBoolDto.class, name = "FieldBaseForSearchBoolDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchListDto.class, name = "FieldBaseForSearchListDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchStringDto.class, name = "FieldBaseForSearchStringDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchDateTimeDto.class, name = "FieldBaseForSearchDateTimeDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchAooDto.class, name = "FieldBaseForSearchAooDto"),
@JsonSubTypes.Type(value = FieldBaseForSearchProtocolloDto.class, name = "FieldBaseForSearchProtocolloDto")
})
public class FieldBaseForSearchDTO {
@JsonProperty("groupId")
private Integer groupId;
@JsonProperty("fieldType")
private Integer fieldType;
@JsonProperty("additionalFieldType")
private Integer additionalFieldType;
@JsonProperty("defaultOperator")
private Integer defaultOperator;
@JsonProperty("tableName")
private String tableName;
@JsonProperty("binderFieldId")
private Integer binderFieldId;
@JsonProperty("multiple")
private String multiple;
@JsonProperty("name")
private String name;
@JsonProperty("externalId")
private String externalId;
@JsonProperty("description")
private String description;
@JsonProperty("order")
private Integer order;
@JsonProperty("dataSource")
private String dataSource;
@JsonProperty("required")
private Boolean required;
@JsonProperty("formula")
private String formula;
@JsonProperty("className")
private String className;
@JsonProperty("locked")
private Boolean locked;
@JsonProperty("comboGruppiId")
private String comboGruppiId;
@JsonProperty("dependencyFields")
private List<DependencyFieldItem> dependencyFields;
@JsonProperty("associations")
private Map<String, String> associations;
@JsonProperty("isAdditional")
private Boolean isAdditional;
@JsonProperty("visible")
private Boolean visible;
@JsonProperty("predefinedProfileFormula")
private String predefinedProfileFormula;
@JsonProperty("dataSourceDiscriminator")
private String dataSourceDiscriminator;
// Getters and Setters
public Integer getGroupId() {
return groupId;
}
public void setGroupId(Integer groupId) {
this.groupId = groupId;
}
public Integer getFieldType() {
return fieldType;
}
public void setFieldType(Integer fieldType) {
this.fieldType = fieldType;
}
public Integer getAdditionalFieldType() {
return additionalFieldType;
}
public void setAdditionalFieldType(Integer additionalFieldType) {
this.additionalFieldType = additionalFieldType;
}
public Integer getDefaultOperator() {
return defaultOperator;
}
public void setDefaultOperator(Integer defaultOperator) {
this.defaultOperator = defaultOperator;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public Integer getBinderFieldId() {
return binderFieldId;
}
public void setBinderFieldId(Integer binderFieldId) {
this.binderFieldId = binderFieldId;
}
public String getMultiple() {
return multiple;
}
public void setMultiple(String multiple) {
this.multiple = multiple;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getExternalId() {
return externalId;
}
public void setExternalId(String externalId) {
this.externalId = externalId;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getOrder() {
return order;
}
public void setOrder(Integer order) {
this.order = order;
}
public String getDataSource() {
return dataSource;
}
public void setDataSource(String dataSource) {
this.dataSource = dataSource;
}
public Boolean getRequired() {
return required;
}
public void setRequired(Boolean required) {
this.required = required;
}
public String getFormula() {
return formula;
}
public void setFormula(String formula) {
this.formula = formula;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Boolean getLocked() {
return locked;
}
public void setLocked(Boolean locked) {
this.locked = locked;
}
public String getComboGruppiId() {
return comboGruppiId;
}
public void setComboGruppiId(String comboGruppiId) {
this.comboGruppiId = comboGruppiId;
}
public List<DependencyFieldItem> getDependencyFields() {
return dependencyFields;
}
public void setDependencyFields(List<DependencyFieldItem> dependencyFields) {
this.dependencyFields = dependencyFields;
}
public Map<String, String> getAssociations() {
return associations;
}
public void setAssociations(Map<String, String> associations) {
this.associations = associations;
}
public Boolean getIsAdditional() {
return isAdditional;
}
public void setIsAdditional(Boolean isAdditional) {
this.isAdditional = isAdditional;
}
public Boolean getVisible() {
return visible;
}
public void setVisible(Boolean visible) {
this.visible = visible;
}
public String getPredefinedProfileFormula() {
return predefinedProfileFormula;
}
public void setPredefinedProfileFormula(String predefinedProfileFormula) {
this.predefinedProfileFormula = predefinedProfileFormula;
}
public String getDataSourceDiscriminator() {
return dataSourceDiscriminator;
}
public void setDataSourceDiscriminator(String dataSourceDiscriminator) {
this.dataSourceDiscriminator = dataSourceDiscriminator;
}
// equals() e hashCode(). Se vuoi, puoi implementare anche toString()
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FieldBaseForSearchDTO that = (FieldBaseForSearchDTO) o;
return Objects.equals(groupId, that.groupId) &&
Objects.equals(fieldType, that.fieldType) &&
Objects.equals(additionalFieldType, that.additionalFieldType) &&
Objects.equals(defaultOperator, that.defaultOperator) &&
Objects.equals(tableName, that.tableName) &&
Objects.equals(binderFieldId, that.binderFieldId) &&
Objects.equals(multiple, that.multiple) &&
Objects.equals(name, that.name) &&
Objects.equals(externalId, that.externalId) &&
Objects.equals(description, that.description) &&
Objects.equals(order, that.order) &&
Objects.equals(dataSource, that.dataSource) &&
Objects.equals(required, that.required) &&
Objects.equals(formula, that.formula) &&
Objects.equals(className, that.className) &&
Objects.equals(locked, that.locked) &&
Objects.equals(comboGruppiId, that.comboGruppiId) &&
Objects.equals(dependencyFields, that.dependencyFields) &&
Objects.equals(associations, that.associations) &&
Objects.equals(isAdditional, that.isAdditional) &&
Objects.equals(visible, that.visible) &&
Objects.equals(predefinedProfileFormula, that.predefinedProfileFormula) &&
Objects.equals(dataSourceDiscriminator, that.dataSourceDiscriminator);
}
@Override
public int hashCode() {
return Objects.hash(groupId, fieldType, additionalFieldType, defaultOperator, tableName, binderFieldId, multiple,
name, externalId, description, order, dataSource, required, formula, className,
locked, comboGruppiId, dependencyFields, associations, isAdditional, visible,
predefinedProfileFormula, dataSourceDiscriminator);
}
}