org.finra.herd.model.api.xml.IndexSearchRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of herd-model-api Show documentation
Show all versions of herd-model-api Show documentation
This project contains the model API classes. This contains the herd XSD and generates Java POJO's from them. These classes are used for incoming
and outgoing calls into the system (e.g. via REST).
package org.finra.herd.model.api.xml;
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for indexSearchRequest complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="indexSearchRequest">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="searchTerm" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="indexSearchFilters" type="{}indexSearchFilters" minOccurs="0"/>
* <element name="facetFields" type="{}facetFields" minOccurs="0"/>
* <element name="enableHitHighlighting" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "indexSearchRequest", propOrder = {
})
@XmlRootElement(name = "indexSearchRequest")
public class IndexSearchRequest implements Serializable, Cloneable, CopyTo2, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = -1L;
protected String searchTerm;
@XmlElementWrapper
@XmlElement(name = "indexSearchFilter")
protected List indexSearchFilters;
@XmlElementWrapper
@XmlElement(name = "facetField")
protected List facetFields;
protected Boolean enableHitHighlighting;
/**
* Default no-arg constructor
*
*/
public IndexSearchRequest() {
super();
}
/**
* Fully-initialising value constructor
*
*/
public IndexSearchRequest(final String searchTerm, final List indexSearchFilters, final List facetFields, final Boolean enableHitHighlighting) {
this.searchTerm = searchTerm;
this.indexSearchFilters = indexSearchFilters;
this.facetFields = facetFields;
this.enableHitHighlighting = enableHitHighlighting;
}
/**
* Gets the value of the searchTerm property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSearchTerm() {
return searchTerm;
}
/**
* Sets the value of the searchTerm property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSearchTerm(String value) {
this.searchTerm = value;
}
/**
* Gets the value of the enableHitHighlighting property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isEnableHitHighlighting() {
return enableHitHighlighting;
}
/**
* Sets the value of the enableHitHighlighting property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setEnableHitHighlighting(Boolean value) {
this.enableHitHighlighting = value;
}
public List getIndexSearchFilters() {
return indexSearchFilters;
}
public void setIndexSearchFilters(List indexSearchFilters) {
this.indexSearchFilters = indexSearchFilters;
}
public List getFacetFields() {
return facetFields;
}
public void setFacetFields(List facetFields) {
this.facetFields = facetFields;
}
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
{
String theSearchTerm;
theSearchTerm = this.getSearchTerm();
strategy.appendField(locator, this, "searchTerm", buffer, theSearchTerm, (this.searchTerm!= null));
}
{
List theIndexSearchFilters;
theIndexSearchFilters = ((this.indexSearchFilters!= null)?this.getIndexSearchFilters():null);
strategy.appendField(locator, this, "indexSearchFilters", buffer, theIndexSearchFilters, (this.indexSearchFilters!= null));
}
{
List theFacetFields;
theFacetFields = ((this.facetFields!= null)?this.getFacetFields():null);
strategy.appendField(locator, this, "facetFields", buffer, theFacetFields, (this.facetFields!= null));
}
{
Boolean theEnableHitHighlighting;
theEnableHitHighlighting = this.isEnableHitHighlighting();
strategy.appendField(locator, this, "enableHitHighlighting", buffer, theEnableHitHighlighting, (this.enableHitHighlighting!= null));
}
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
final IndexSearchRequest that = ((IndexSearchRequest) object);
{
String lhsSearchTerm;
lhsSearchTerm = this.getSearchTerm();
String rhsSearchTerm;
rhsSearchTerm = that.getSearchTerm();
if (!strategy.equals(LocatorUtils.property(thisLocator, "searchTerm", lhsSearchTerm), LocatorUtils.property(thatLocator, "searchTerm", rhsSearchTerm), lhsSearchTerm, rhsSearchTerm, (this.searchTerm!= null), (that.searchTerm!= null))) {
return false;
}
}
{
List lhsIndexSearchFilters;
lhsIndexSearchFilters = ((this.indexSearchFilters!= null)?this.getIndexSearchFilters():null);
List rhsIndexSearchFilters;
rhsIndexSearchFilters = ((that.indexSearchFilters!= null)?that.getIndexSearchFilters():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "indexSearchFilters", lhsIndexSearchFilters), LocatorUtils.property(thatLocator, "indexSearchFilters", rhsIndexSearchFilters), lhsIndexSearchFilters, rhsIndexSearchFilters, (this.indexSearchFilters!= null), (that.indexSearchFilters!= null))) {
return false;
}
}
{
List lhsFacetFields;
lhsFacetFields = ((this.facetFields!= null)?this.getFacetFields():null);
List rhsFacetFields;
rhsFacetFields = ((that.facetFields!= null)?that.getFacetFields():null);
if (!strategy.equals(LocatorUtils.property(thisLocator, "facetFields", lhsFacetFields), LocatorUtils.property(thatLocator, "facetFields", rhsFacetFields), lhsFacetFields, rhsFacetFields, (this.facetFields!= null), (that.facetFields!= null))) {
return false;
}
}
{
Boolean lhsEnableHitHighlighting;
lhsEnableHitHighlighting = this.isEnableHitHighlighting();
Boolean rhsEnableHitHighlighting;
rhsEnableHitHighlighting = that.isEnableHitHighlighting();
if (!strategy.equals(LocatorUtils.property(thisLocator, "enableHitHighlighting", lhsEnableHitHighlighting), LocatorUtils.property(thatLocator, "enableHitHighlighting", rhsEnableHitHighlighting), lhsEnableHitHighlighting, rhsEnableHitHighlighting, (this.enableHitHighlighting!= null), (that.enableHitHighlighting!= null))) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = 1;
{
String theSearchTerm;
theSearchTerm = this.getSearchTerm();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "searchTerm", theSearchTerm), currentHashCode, theSearchTerm, (this.searchTerm!= null));
}
{
List theIndexSearchFilters;
theIndexSearchFilters = ((this.indexSearchFilters!= null)?this.getIndexSearchFilters():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "indexSearchFilters", theIndexSearchFilters), currentHashCode, theIndexSearchFilters, (this.indexSearchFilters!= null));
}
{
List theFacetFields;
theFacetFields = ((this.facetFields!= null)?this.getFacetFields():null);
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "facetFields", theFacetFields), currentHashCode, theFacetFields, (this.facetFields!= null));
}
{
Boolean theEnableHitHighlighting;
theEnableHitHighlighting = this.isEnableHitHighlighting();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "enableHitHighlighting", theEnableHitHighlighting), currentHashCode, theEnableHitHighlighting, (this.enableHitHighlighting!= null));
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
public Object clone() {
return copyTo(createNewInstance());
}
public Object copyTo(Object target) {
final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE;
return copyTo(null, target, strategy);
}
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
final Object draftCopy = ((target == null)?createNewInstance():target);
if (draftCopy instanceof IndexSearchRequest) {
final IndexSearchRequest copy = ((IndexSearchRequest) draftCopy);
{
Boolean searchTermShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.searchTerm!= null));
if (searchTermShouldBeCopiedAndSet == Boolean.TRUE) {
String sourceSearchTerm;
sourceSearchTerm = this.getSearchTerm();
String copySearchTerm = ((String) strategy.copy(LocatorUtils.property(locator, "searchTerm", sourceSearchTerm), sourceSearchTerm, (this.searchTerm!= null)));
copy.setSearchTerm(copySearchTerm);
} else {
if (searchTermShouldBeCopiedAndSet == Boolean.FALSE) {
copy.searchTerm = null;
}
}
}
{
Boolean indexSearchFiltersShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.indexSearchFilters!= null));
if (indexSearchFiltersShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceIndexSearchFilters;
sourceIndexSearchFilters = ((this.indexSearchFilters!= null)?this.getIndexSearchFilters():null);
@SuppressWarnings("unchecked")
List copyIndexSearchFilters = ((List ) strategy.copy(LocatorUtils.property(locator, "indexSearchFilters", sourceIndexSearchFilters), sourceIndexSearchFilters, (this.indexSearchFilters!= null)));
copy.indexSearchFilters = null;
if (copyIndexSearchFilters!= null) {
copy.setIndexSearchFilters(copyIndexSearchFilters);
}
} else {
if (indexSearchFiltersShouldBeCopiedAndSet == Boolean.FALSE) {
copy.indexSearchFilters = null;
}
}
}
{
Boolean facetFieldsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.facetFields!= null));
if (facetFieldsShouldBeCopiedAndSet == Boolean.TRUE) {
List sourceFacetFields;
sourceFacetFields = ((this.facetFields!= null)?this.getFacetFields():null);
@SuppressWarnings("unchecked")
List copyFacetFields = ((List ) strategy.copy(LocatorUtils.property(locator, "facetFields", sourceFacetFields), sourceFacetFields, (this.facetFields!= null)));
copy.facetFields = null;
if (copyFacetFields!= null) {
copy.setFacetFields(copyFacetFields);
}
} else {
if (facetFieldsShouldBeCopiedAndSet == Boolean.FALSE) {
copy.facetFields = null;
}
}
}
{
Boolean enableHitHighlightingShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.enableHitHighlighting!= null));
if (enableHitHighlightingShouldBeCopiedAndSet == Boolean.TRUE) {
Boolean sourceEnableHitHighlighting;
sourceEnableHitHighlighting = this.isEnableHitHighlighting();
Boolean copyEnableHitHighlighting = ((Boolean) strategy.copy(LocatorUtils.property(locator, "enableHitHighlighting", sourceEnableHitHighlighting), sourceEnableHitHighlighting, (this.enableHitHighlighting!= null)));
copy.setEnableHitHighlighting(copyEnableHitHighlighting);
} else {
if (enableHitHighlightingShouldBeCopiedAndSet == Boolean.FALSE) {
copy.enableHitHighlighting = null;
}
}
}
}
return draftCopy;
}
public Object createNewInstance() {
return new IndexSearchRequest();
}
}