Grooper.CMIS.ComparisonPredicate

Specifies search criteria for an individual property, using a comparison between the property value and a constant. The comparison predicate takes the general form PropertyName Operator Value, where PropertyName is the Query Name of a property, Operator is one of the operators from the table below, and Value is a constant value against which the property should be compared.

Valid Operators

Below is a list of operators which can be used in a comparison.

OperatorDescriptionComments
=Equal toValid on all property types.
<>Not equal toValid on all property types.
<Less thanValid on numeric and date/time property types.
>Greater thanValid on numeric and date/time property types.
<=Less than or equal toValid on numeric and date/time property types.
>=Greater than or equal toValid on numeric and date/time property types.
LIKEContains a substringValid on string types only. See 'LIKE Operator' section below for details.
ISIS NULL or IS NOT NULLValid on all property types.

Examples by Property Type

The table below outlines the requirements of a comparison predicate for each type of property.

Property TypeSupported OperatorsQuotedExample
String=, <>, LIKE, ISYesvendor_name LIKE '%acme%'
Decimal=, <>, <, <=, >, >=, ISNoinvoice_amount <= 1000.00
Integer=, <>, <, <=, >, >=, ISNoquantity = 0
Boolean=, ISNotax_exempt = true
DateTime=, <>, <, <=, >, >=, ISYesinvoice_date < '01/01/2018'
ID=, <>, ISYestype_id='2fadac71-a9a9-4185-9070-e3b23517e518'
URI=, <>, LIKE, ISYesvendor_website LIKE 'http://www.grooper.com/%'

LIKE Operator

The LIKE operator specifies that a property value must contain a substring. It takes the general form PropertyName LIKE 'Expression', where PropertyName is the query name of a string property, and Expression is a string literal using the '%' and '_' characters as wildcards. The LIKE operator is not case sensitive.

The '%' wildcard substitutes for zero or more characters. The '_' wildcard substitutes for exactly one character. A LIKE expression with no wildcards is equivalent to using the = operator. The expression 'grooper%' will match cases where the property value begins with 'grooper', while '%grooper' will match cases where the property value ends with 'grooper'. The expression 'grooper%review' will match cases where the property value begins with 'grooper' and ends with 'review'.

NOTE: Some CMIS Bindings have limited support for LIKE expressions, and will raise errors when unsupported features are used. Examples of such issues are as follows:


Inherits from: Grooper.CMIS.WherePredicate

Constructors

Signature Description
New (PropDef As IPropertyDefinition, CompOp As String, Value As String, Inverted As Boolean)
Parameters
PropDef
          Type: IPropertyDefinition
          
 
CompOp
          Type: String
          
 
Value
          Type: String
          
 
Inverted
          Type: Boolean
          

Fields

Field Name Field Type Description
CompOp As System.String System.String
Inverted As System.Boolean System.Boolean
PropDef As PortCMIS.Data.IPropertyDefinition PortCMIS.Data.IPropertyDefinition
Value As System.String System.String

Properties

Property Name Property Type Description
IsEmpty System.Boolean Returns true if all properties with a ViewableAttribute are set to their default value.
IsWriteable System.Boolean Returns true if the object is writable, or false if it is not.

Methods

Method Name Description
GetInvertedValue(Value As Boolean) As Boolean Returns the inverse of the passed Boolean value, if this query element's Inverted property is True, otherwise the passed Boolean value is returned.
Parameters
Value
          Type: Boolean
          
GetProperties() As PropertyDescriptorCollection
IsPropertyEnabled(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently enabled.
Parameters
PropertyName
          Type: String
          The name of the property to determine the enabled state for.
IsPropertyVisible(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently visible.
Parameters
PropertyName
          Type: String
          The name of the property to determine the visible state for.
IsType(Type As Type) As Boolean Returns true if the object is of the type specified, or if it derives from the type specfied.
Parameters
Type
          Type: Type
          The type to check.
ToString() As String
ValidateProperties() As ValidationErrorList Validates the properties of the object, returning a list of validation errors.