Class SearchCriteria.MatchClause
- java.lang.Object
-
- ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria.MatchClause
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
SearchCriteria.AnyFieldMatchClause,SearchCriteria.AnyPropertyMatchClause,SearchCriteria.AttributeMatchClause,SearchCriteria.PropertyMatchClause,SearchCriteria.TimeAttributeMatchClause
- Enclosing class:
- SearchCriteria
@JsonObject("MatchClause") public static class SearchCriteria.MatchClause extends java.lang.Object implements java.io.SerializableA specification of one field (either property or attribute) and desired value for that field.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMatchClause(SearchCriteria.MatchClauseFieldType fieldType, java.lang.String fieldCode, java.lang.String desiredValue, SearchCriteria.CompareMode compareMode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SearchCriteria.MatchClausecreateAnyFieldMatch(java.lang.String desiredValue)Factory method to create a MatchClause matching against any property or attribute.static SearchCriteria.MatchClausecreateAnyPropertyMatch(java.lang.String desiredValue)Factory method to create a MatchClause matching against any property.static SearchCriteria.MatchClausecreateAttributeMatch(SearchCriteria.MatchClauseAttribute attribute, java.lang.String desiredValue)Factory method to create a MatchClause matching against a specific attribute.static SearchCriteria.MatchClausecreatePropertyMatch(java.lang.String propertyCode, java.lang.String desiredValue)Factory method to create a MatchClause matching against a specific property.static SearchCriteria.MatchClausecreateTimeAttributeMatch(SearchCriteria.MatchClauseTimeAttribute attribute, SearchCriteria.CompareMode mode, java.lang.String date, java.lang.String timezone)Factory method to create a MatchClause matching against registration or modification date.booleanequals(java.lang.Object obj)static java.lang.Stringescape(java.lang.String s)Returns a String where those characters that Lucene expects to be escaped are escaped by a preceding\.SearchCriteria.CompareModegetCompareMode()java.lang.StringgetDesiredValue()protected java.lang.StringgetFieldCode()The code of the field.SearchCriteria.MatchClauseFieldTypegetFieldType()The field type this MatchClause matches against.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
MatchClause
protected MatchClause(SearchCriteria.MatchClauseFieldType fieldType, java.lang.String fieldCode, java.lang.String desiredValue, SearchCriteria.CompareMode compareMode)
-
-
Method Detail
-
createPropertyMatch
public static SearchCriteria.MatchClause createPropertyMatch(java.lang.String propertyCode, java.lang.String desiredValue)
Factory method to create a MatchClause matching against a specific property.- Parameters:
propertyCode- The name of the property to compare against.desiredValue- The desired value for the property.
-
createAttributeMatch
public static SearchCriteria.MatchClause createAttributeMatch(SearchCriteria.MatchClauseAttribute attribute, java.lang.String desiredValue)
Factory method to create a MatchClause matching against a specific attribute.- Parameters:
attribute- The attribute to compare against.desiredValue- The desired value for the attribute.
-
createTimeAttributeMatch
public static SearchCriteria.MatchClause createTimeAttributeMatch(SearchCriteria.MatchClauseTimeAttribute attribute, SearchCriteria.CompareMode mode, java.lang.String date, java.lang.String timezone)
Factory method to create a MatchClause matching against registration or modification date.- Parameters:
attribute- The attribute to compare againstmode- The kind of comparison (<=, ==, >=)date- The date to compare against, format YYYY-MM-DD
-
createAnyPropertyMatch
public static SearchCriteria.MatchClause createAnyPropertyMatch(java.lang.String desiredValue)
Factory method to create a MatchClause matching against any property.- Parameters:
desiredValue- The desired value for a property.
-
createAnyFieldMatch
public static SearchCriteria.MatchClause createAnyFieldMatch(java.lang.String desiredValue)
Factory method to create a MatchClause matching against any property or attribute.- Parameters:
desiredValue- The desired value for a property or an attribute.
-
escape
public static java.lang.String escape(java.lang.String s)
Returns a String where those characters that Lucene expects to be escaped are escaped by a preceding\.Copy of Lucene's
QueryParser.escape()method.
-
getFieldType
public SearchCriteria.MatchClauseFieldType getFieldType()
The field type this MatchClause matches against. Could be either a property or attribute.
-
getFieldCode
protected java.lang.String getFieldCode()
The code of the field.
-
getDesiredValue
public java.lang.String getDesiredValue()
-
getCompareMode
public SearchCriteria.CompareMode getCompareMode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-