/** * Create an instance of {@link IndexSearchHighlightField } * */ public IndexSearchHighlightField createIndexSearchHighlightField() { return new IndexSearchHighlightField(); }
public String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); }
public static IndexSearchHighlightField.Builder<Void> copyOnly(final IndexSearchHighlightField _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.INCLUDE); }
public Object clone() { return copyTo(createNewInstance()); }
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { { String theFieldName; theFieldName = this.getFieldName(); strategy.appendField(locator, this, "fieldName", buffer, theFieldName, (this.fieldName!= null)); } { Integer theFragmentSize; theFragmentSize = this.getFragmentSize(); strategy.appendField(locator, this, "fragmentSize", buffer, theFragmentSize, (this.fragmentSize!= null)); } { List<String> theMatchedFields; theMatchedFields = (((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))?this.getMatchedFields():null); strategy.appendField(locator, this, "matchedFields", buffer, theMatchedFields, ((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))); } { Integer theNumOfFragments; theNumOfFragments = this.getNumOfFragments(); strategy.appendField(locator, this, "numOfFragments", buffer, theNumOfFragments, (this.numOfFragments!= null)); } return buffer; }
public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) { final Object draftCopy = ((target == null)?createNewInstance():target); if (draftCopy instanceof IndexSearchHighlightField) { final IndexSearchHighlightField copy = ((IndexSearchHighlightField) draftCopy); if (fieldNameShouldBeCopiedAndSet == Boolean.TRUE) { String sourceFieldName; sourceFieldName = this.getFieldName(); String copyFieldName = ((String) strategy.copy(LocatorUtils.property(locator, "fieldName", sourceFieldName), sourceFieldName, (this.fieldName!= null))); copy.setFieldName(copyFieldName); } else { if (fieldNameShouldBeCopiedAndSet == Boolean.FALSE) { if (fragmentSizeShouldBeCopiedAndSet == Boolean.TRUE) { Integer sourceFragmentSize; sourceFragmentSize = this.getFragmentSize(); Integer copyFragmentSize = ((Integer) strategy.copy(LocatorUtils.property(locator, "fragmentSize", sourceFragmentSize), sourceFragmentSize, (this.fragmentSize!= null))); copy.setFragmentSize(copyFragmentSize); } else { if (fragmentSizeShouldBeCopiedAndSet == Boolean.FALSE) { if (matchedFieldsShouldBeCopiedAndSet == Boolean.TRUE) { List<String> sourceMatchedFields; sourceMatchedFields = (((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))?this.getMatchedFields():null); @SuppressWarnings("unchecked") List<String> copyMatchedFields = ((List<String> ) strategy.copy(LocatorUtils.property(locator, "matchedFields", sourceMatchedFields), sourceMatchedFields, ((this.matchedFields!= null)&&(!this.matchedFields.isEmpty())))); copy.matchedFields = null; if (copyMatchedFields!= null) { List<String> uniqueMatchedFieldsl = copy.getMatchedFields(); uniqueMatchedFieldsl.addAll(copyMatchedFields);
public Object copyTo(Object target) { final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE; return copyTo(null, target, strategy); }
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 int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = 1; { String theFieldName; theFieldName = this.getFieldName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fieldName", theFieldName), currentHashCode, theFieldName, (this.fieldName!= null)); } { Integer theFragmentSize; theFragmentSize = this.getFragmentSize(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "fragmentSize", theFragmentSize), currentHashCode, theFragmentSize, (this.fragmentSize!= null)); } { List<String> theMatchedFields; theMatchedFields = (((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))?this.getMatchedFields():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "matchedFields", theMatchedFields), currentHashCode, theMatchedFields, ((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))); } { Integer theNumOfFragments; theNumOfFragments = this.getNumOfFragments(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "numOfFragments", theNumOfFragments), currentHashCode, theNumOfFragments, (this.numOfFragments!= null)); } return currentHashCode; }
public static<_B >IndexSearchHighlightField.Builder<_B> copyOf(final IndexSearchHighlightField _other) { final IndexSearchHighlightField.Builder<_B> _newBuilder = new IndexSearchHighlightField.Builder<_B>(null, null, false); _other.copyTo(_newBuilder); return _newBuilder; }
lhsFieldName = this.getFieldName(); String rhsFieldName; rhsFieldName = that.getFieldName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "fieldName", lhsFieldName), LocatorUtils.property(thatLocator, "fieldName", rhsFieldName), lhsFieldName, rhsFieldName, (this.fieldName!= null), (that.fieldName!= null))) { return false; lhsFragmentSize = this.getFragmentSize(); Integer rhsFragmentSize; rhsFragmentSize = that.getFragmentSize(); if (!strategy.equals(LocatorUtils.property(thisLocator, "fragmentSize", lhsFragmentSize), LocatorUtils.property(thatLocator, "fragmentSize", rhsFragmentSize), lhsFragmentSize, rhsFragmentSize, (this.fragmentSize!= null), (that.fragmentSize!= null))) { return false; lhsMatchedFields = (((this.matchedFields!= null)&&(!this.matchedFields.isEmpty()))?this.getMatchedFields():null); List<String> rhsMatchedFields; rhsMatchedFields = (((that.matchedFields!= null)&&(!that.matchedFields.isEmpty()))?that.getMatchedFields():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "matchedFields", lhsMatchedFields), LocatorUtils.property(thatLocator, "matchedFields", rhsMatchedFields), lhsMatchedFields, rhsMatchedFields, ((this.matchedFields!= null)&&(!this.matchedFields.isEmpty())), ((that.matchedFields!= null)&&(!that.matchedFields.isEmpty())))) { return false; lhsNumOfFragments = this.getNumOfFragments(); Integer rhsNumOfFragments; rhsNumOfFragments = that.getNumOfFragments(); if (!strategy.equals(LocatorUtils.property(thisLocator, "numOfFragments", lhsNumOfFragments), LocatorUtils.property(thatLocator, "numOfFragments", rhsNumOfFragments), lhsNumOfFragments, rhsNumOfFragments, (this.numOfFragments!= null), (that.numOfFragments!= null))) { return false;
public Object createNewInstance() { return new IndexSearchHighlightField(); }
public static<_B >IndexSearchHighlightField.Builder<_B> copyOf(final IndexSearchHighlightField _other, final PropertyTree _propertyTree, final PropertyTreeUse _propertyTreeUse) { final IndexSearchHighlightField.Builder<_B> _newBuilder = new IndexSearchHighlightField.Builder<_B>(null, null, false); _other.copyTo(_newBuilder, _propertyTree, _propertyTreeUse); return _newBuilder; }
public static IndexSearchHighlightField.Builder<Void> copyExcept(final IndexSearchHighlightField _other, final PropertyTree _propertyTree) { return copyOf(_other, _propertyTree, PropertyTreeUse.EXCLUDE); }
HighlightBuilder.Field highlightField = new HighlightBuilder.Field(highlightFieldConfig.getFieldName()); if (CollectionUtils.isNotEmpty(highlightFieldConfig.getMatchedFields())) highlightField.matchedFields(highlightFieldConfig.getMatchedFields().toArray(new String[0])); if (highlightFieldConfig.getFragmentSize() != null) highlightField.fragmentSize(highlightFieldConfig.getFragmentSize()); if (highlightFieldConfig.getNumOfFragments() != null) highlightField.numOfFragments(highlightFieldConfig.getNumOfFragments());
@Override public IndexSearchHighlightField build() { if (_storedValue == null) { return this.init(new IndexSearchHighlightField()); } else { return ((IndexSearchHighlightField) _storedValue); } }
HighlightBuilder.Field highlightField = new HighlightBuilder.Field(highlightFieldConfig.getFieldName()); if (CollectionUtils.isNotEmpty(highlightFieldConfig.getMatchedFields())) highlightField.matchedFields(highlightFieldConfig.getMatchedFields().toArray(new String[0])); if (highlightFieldConfig.getFragmentSize() != null) highlightField.fragmentSize(highlightFieldConfig.getFragmentSize()); if (highlightFieldConfig.getNumOfFragments() != null) highlightField.numOfFragments(highlightFieldConfig.getNumOfFragments());
new IndexSearchHighlightField("displayName", 100, Arrays.asList("displayName", "displayName.stemmed", "displayName.ngrams"), 5); new IndexSearchHighlightField("columnName", 100, Arrays.asList("columnName", "columnName.stemmed", "columnName.ngrams"), 5);