Micro Focus Content Manager SDK 10.1
TRIM.SDK.TrimSearchClause Class Reference

The TrimSearchOperator is a type of TrimSearchStackItem that represents an operator - one of (and, or, not) More...

Inheritance diagram for TRIM.SDK.TrimSearchClause:
TRIM.SDK.TrimSearchStackItem

Public Member Functions

 TrimSearchClause (Database database, BaseObjectTypes objectType, SearchClauseIds clauseId)
 Construct a search stack item that is a search clause based on a specified standard clause id. More...
 
 TrimSearchClause (Database database, BaseObjectTypes objectType, FieldDefinition userField)
 Construct a search stack item that is a search clause based on a specified user-defined field. More...
 
void SetParameterCaption (string shortValue, string extendedCaption)
 For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Set long and short strings providing some help text regarding how to format the search parameter string for this clause. More...
 
bool SetCriteriaFromString (string searchCriteria)
 Sets the search criteria for this clause based on a string that could be typed by a user. This string criteria is identical to the criteria portion of the wider search string supported by the TrimMainObjectSearch, for example for a date search, the string could be 'last 3 days", for a disposition search it could be 'active'. If it fails, you can inspect the ErrorMessage property. More...
 
bool SetCriteriaFromString (string searchCriteria, ComparisonType compareOperator)
 Sets the search criteria for this clause based on a string that could be typed by a user. In addition, you can use one of the comparision operators if it is appropriate for the parameter type and value supplied. More...
 
void SetCriteriaFromDateRange (TrimDateTime from, TrimDateTime to)
 Sets the search criteria for this clause to be a date range. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based. More...
 
void SetCriteriaFromDateComparison (ComparisonType compareOperator, TrimDateTime dateValue)
 Sets the search criteria for this clause to be a comparison to a specified date. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based. The dateValue can be determined from DateFrom/DateTo values. More...
 
TrimDateTime GetDateFrom ()
 Gets the low value of a date range search. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based. More...
 
TrimDateTime GetDateTo ()
 Gets the high value of a date range search. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based. More...
 
void SetCriteriaFromUriArray (TrimURIList uris)
 Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. More...
 
void SetCriteriaFromUriArray (TrimURIList uris, string title)
 Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. More...
 
void SetCriteriaFromUriArray (TrimURIList uris, string title, bool recursive)
 Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects. More...
 
void SetCriteriaFromSingleUri (TrimURI objectUri)
 Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. More...
 
void SetCriteriaFromSingleUri (TrimURI objectUri, string title)
 Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. More...
 
void SetCriteriaFromSingleUri (TrimURI objectUri, string title, bool recursive)
 Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects. More...
 
void SetCriteriaFromObject (TrimObject arg0)
 Sets the search criteria for this clause to be a single uri of the supplied object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. More...
 
void SetCriteriaFromObject (TrimObject arg0, string title)
 Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. You can specify an optional string describing this search clause which will be used to compose a title for the search. More...
 
void SetCriteriaFromObject (TrimObject arg0, string title, bool recursive)
 Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects. More...
 
void SetCriteriaFromSubSearch (TrimSearchStack searchStack)
 Sets the search criteria for this clause to be a search for an object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. More...
 
void SetCriteriaFromSubSearch (TrimSearchStack searchStack, bool recursive)
 Sets the search criteria for this clause to be a search for an object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects. More...
 
void SetCriteriaFromEnumValueArray< EnumT > (EnumT[] values)
 
void SetCriteriaFromEnumValueArray (EnumItemList enumList)
 Sets the search criteria for this clause to be a search for a list of enum item values. This should only be used for search clauses that have a parameter format of Enum (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied enum values must be of the correct type for the search clause. More...
 
bool ItemMatches (TrimObject trimObject)
 Determines if the specified object matches the criteria for this search More...
 

Properties

bool IsNegated [get, set]
 Gets or sets a boolean variable indicating whether this search clause is negated, ie the opposite of the actual criteria More...
 
string ErrorMessage [get]
 All TRIM SDK objects have an ErrorMessage property which can be used to examine any error that may have occurred in the most recent method call. More...
 
TrimException Error [get]
 All TRIM SDK objects have an Error property which can be used to examine any error that may have occurred in the most recent method call. More...
 
Database Database [get]
 Gets the TRIM Database object in which this collection resides. More...
 
BaseObjectTypes TrimType [get]
 Gets a BaseObjectTypes enum value indicating the type of object in this collection. More...
 
bool IsFieldSearch [get]
 Gets a boolean property indicating whether this search clause is based on a user-defined field (otherwise it will be based on a SearchClauseId). More...
 
SearchClauseIds ClauseId [get]
 Gets the SearchClauseIds property upon which this search clause is based (provided it is not a user-defined field search) More...
 
string ParameterToolTip [get]
 Gets a string providing some help text regarding how to format the search parameter string for this clause. More...
 
string ParameterCaption [get]
 For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Gets a string providing some help text regarding how to format the search parameter string for this clause. More...
 
string ShortParameterCaption [get]
 For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Gets a short string providing some help text regarding how to format the search parameter string for this clause. More...
 
FieldDefinitionField [get]
 Gets the User-Defined FieldDefinition upon which this search clause is based (if it is actually a user-defined field search). More...
 
string CriteriaString [get]
 Gets a string value representing the criteria for this clause. More...
 
ComparisonType ComparisonOperator [get]
 Gets a ComparisonType enum value representing the comparison operator being used for matching with the criteria string More...
 
TrimURIListUriArrayCriteria [get]
 Gets the current criteria value of a object search, if it is based on a uri Array. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). More...
 
TrimURI SingleUriCriteria [get]
 Gets the current criteria value of a object search, if it is based on a single uri or object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). More...
 
bool IsRecursive [get]
 Gets a boolean value indicating if the current criteria of an object search is to be applied recursively. More...
 
bool IsSubSearch [get]
 Gets a boolean value indicating if the current criteria of an object search is a sub-search. More...
 
TrimSearchStackSubSearch [get]
 Gets a TrimSearchStack that represents a sub-search. A sub-search can be used if the search clause is based on a criteria which represents one of more TRIM main objects, for example, searching for records based on assignee. The specification of the assignee can be a location search. This stack returned will be in reverse polish format which doesn't include any precedence operators. Note that the function will return NULL if the search criteria is not a sub search. More...
 
int AccessControlType [get, set]
 For the acl and copyacl search methods, there is an extra parameter, the access control type, used in conjunction with the location. A search string could look like acl:"Destroy Record",["Simpson, David"], in which case the search is composed of the "Destroy Record" access control type, plus a location sub-search. More...
 
BaseObjectTypes SubQueryObjectType [get, set]
 For some methods (e.g. the userLabel stuckOn search method), there is an extra parameter, a dynamic object type, used in conjunction with the a search specification for that object. For example, a search string could look like stuckOn:location, ["Simpson, David"], in which case/ the search is for labels attached to locations, matching the location sub-search. More...
 
RecordRelationshipType RecordRelationshipType [get, set]
 For the record relationship search method, you also need to specify the relationship type parameter More...
 
RevRecRelationship RecordReverseRelationshipType [get, set]
 For the record reverse relationship search method, you also need to specify the reverse relationship type parameter More...
 
- Properties inherited from TRIM.SDK.TrimSearchStackItem
bool IsOperator [get]
 Indicates if this search item is an operator (and, or, not) More...
 
bool IsSearchClause [get]
 Indicates if this search item is a search clause, eg "dateCreated = today" More...
 

Detailed Description

The TrimSearchOperator is a type of TrimSearchStackItem that represents an operator - one of (and, or, not)

Constructor & Destructor Documentation

◆ TrimSearchClause() [1/2]

TRIM.SDK.TrimSearchClause.TrimSearchClause ( Database  database,
BaseObjectTypes  objectType,
SearchClauseIds  clauseId 
)

Construct a search stack item that is a search clause based on a specified standard clause id.

◆ TrimSearchClause() [2/2]

TRIM.SDK.TrimSearchClause.TrimSearchClause ( Database  database,
BaseObjectTypes  objectType,
FieldDefinition  userField 
)

Construct a search stack item that is a search clause based on a specified user-defined field.

Member Function Documentation

◆ GetDateFrom()

TrimDateTime TRIM.SDK.TrimSearchClause.GetDateFrom ( )

Gets the low value of a date range search. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based.

◆ GetDateTo()

TrimDateTime TRIM.SDK.TrimSearchClause.GetDateTo ( )

Gets the high value of a date range search. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based.

◆ ItemMatches()

bool TRIM.SDK.TrimSearchClause.ItemMatches ( TrimObject  trimObject)

Determines if the specified object matches the criteria for this search

◆ SetCriteriaFromDateComparison()

void TRIM.SDK.TrimSearchClause.SetCriteriaFromDateComparison ( ComparisonType  compareOperator,
TrimDateTime  dateValue 
)

Sets the search criteria for this clause to be a comparison to a specified date. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based. The dateValue can be determined from DateFrom/DateTo values.

◆ SetCriteriaFromDateRange()

void TRIM.SDK.TrimSearchClause.SetCriteriaFromDateRange ( TrimDateTime  from,
TrimDateTime  to 
)

Sets the search criteria for this clause to be a date range. This should only be used for search clauses that have a parameter format of DateTime (see SearchClauseDef class for information on how to determine if a search clause is date time based.

◆ SetCriteriaFromEnumValueArray()

void TRIM.SDK.TrimSearchClause.SetCriteriaFromEnumValueArray ( EnumItemList  enumList)

Sets the search criteria for this clause to be a search for a list of enum item values. This should only be used for search clauses that have a parameter format of Enum (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied enum values must be of the correct type for the search clause.

◆ SetCriteriaFromEnumValueArray< EnumT >()

Type Constraints
EnumT :struct 
EnumT :System.IConvertible 

◆ SetCriteriaFromObject() [1/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromObject ( TrimObject  arg0)

Sets the search criteria for this clause to be a single uri of the supplied object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause.

◆ SetCriteriaFromObject() [2/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromObject ( TrimObject  arg0,
string  title 
)

Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. You can specify an optional string describing this search clause which will be used to compose a title for the search.

◆ SetCriteriaFromObject() [3/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromObject ( TrimObject  arg0,
string  title,
bool  recursive 
)

Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects.

◆ SetCriteriaFromSingleUri() [1/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromSingleUri ( TrimURI  objectUri)

Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based.

◆ SetCriteriaFromSingleUri() [2/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromSingleUri ( TrimURI  objectUri,
string  title 
)

Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search.

◆ SetCriteriaFromSingleUri() [3/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromSingleUri ( TrimURI  objectUri,
string  title,
bool  recursive 
)

Sets the search criteria for this clause to be a single uri. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects.

◆ SetCriteriaFromString() [1/2]

bool TRIM.SDK.TrimSearchClause.SetCriteriaFromString ( string  searchCriteria)

Sets the search criteria for this clause based on a string that could be typed by a user. This string criteria is identical to the criteria portion of the wider search string supported by the TrimMainObjectSearch, for example for a date search, the string could be 'last 3 days", for a disposition search it could be 'active'. If it fails, you can inspect the ErrorMessage property.

◆ SetCriteriaFromString() [2/2]

bool TRIM.SDK.TrimSearchClause.SetCriteriaFromString ( string  searchCriteria,
ComparisonType  compareOperator 
)

Sets the search criteria for this clause based on a string that could be typed by a user. In addition, you can use one of the comparision operators if it is appropriate for the parameter type and value supplied.

◆ SetCriteriaFromSubSearch() [1/2]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromSubSearch ( TrimSearchStack  searchStack)

Sets the search criteria for this clause to be a search for an object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause.

◆ SetCriteriaFromSubSearch() [2/2]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromSubSearch ( TrimSearchStack  searchStack,
bool  recursive 
)

Sets the search criteria for this clause to be a search for an object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based). The supplied TrimObject must be of the correct type for the search clause. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects.

◆ SetCriteriaFromUriArray() [1/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromUriArray ( TrimURIList  uris)

Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based.

◆ SetCriteriaFromUriArray() [2/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromUriArray ( TrimURIList  uris,
string  title 
)

Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search.

◆ SetCriteriaFromUriArray() [3/3]

void TRIM.SDK.TrimSearchClause.SetCriteriaFromUriArray ( TrimURIList  uris,
string  title,
bool  recursive 
)

Sets the search criteria for this clause to be an array of uris. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based. You can specify an optional string describing this search clause which will be used to compose a title for the search. The recursive parameter allows you to specify whether to also select based on subordinate elements of the specified objects.

◆ SetParameterCaption()

void TRIM.SDK.TrimSearchClause.SetParameterCaption ( string  shortValue,
string  extendedCaption 
)

For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Set long and short strings providing some help text regarding how to format the search parameter string for this clause.

Property Documentation

◆ AccessControlType

int TRIM.SDK.TrimSearchClause.AccessControlType
getset

For the acl and copyacl search methods, there is an extra parameter, the access control type, used in conjunction with the location. A search string could look like acl:"Destroy Record",["Simpson, David"], in which case the search is composed of the "Destroy Record" access control type, plus a location sub-search.

◆ ClauseId

SearchClauseIds TRIM.SDK.TrimSearchClause.ClauseId
get

Gets the SearchClauseIds property upon which this search clause is based (provided it is not a user-defined field search)

◆ ComparisonOperator

ComparisonType TRIM.SDK.TrimSearchClause.ComparisonOperator
get

Gets a ComparisonType enum value representing the comparison operator being used for matching with the criteria string

◆ CriteriaString

string TRIM.SDK.TrimSearchClause.CriteriaString
get

Gets a string value representing the criteria for this clause.

◆ Database

Database TRIM.SDK.TrimSearchClause.Database
get

Gets the TRIM Database object in which this collection resides.

◆ Error

TrimException TRIM.SDK.TrimSearchClause.Error
get

All TRIM SDK objects have an Error property which can be used to examine any error that may have occurred in the most recent method call.

◆ ErrorMessage

string TRIM.SDK.TrimSearchClause.ErrorMessage
get

All TRIM SDK objects have an ErrorMessage property which can be used to examine any error that may have occurred in the most recent method call.

◆ Field

FieldDefinition? TRIM.SDK.TrimSearchClause.Field
get

Gets the User-Defined FieldDefinition upon which this search clause is based (if it is actually a user-defined field search).

◆ IsFieldSearch

bool TRIM.SDK.TrimSearchClause.IsFieldSearch
get

Gets a boolean property indicating whether this search clause is based on a user-defined field (otherwise it will be based on a SearchClauseId).

◆ IsNegated

bool TRIM.SDK.TrimSearchClause.IsNegated
getset

Gets or sets a boolean variable indicating whether this search clause is negated, ie the opposite of the actual criteria

◆ IsRecursive

bool TRIM.SDK.TrimSearchClause.IsRecursive
get

Gets a boolean value indicating if the current criteria of an object search is to be applied recursively.

◆ IsSubSearch

bool TRIM.SDK.TrimSearchClause.IsSubSearch
get

Gets a boolean value indicating if the current criteria of an object search is a sub-search.

◆ ParameterCaption

string TRIM.SDK.TrimSearchClause.ParameterCaption
get

For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Gets a string providing some help text regarding how to format the search parameter string for this clause.

◆ ParameterToolTip

string TRIM.SDK.TrimSearchClause.ParameterToolTip
get

Gets a string providing some help text regarding how to format the search parameter string for this clause.

◆ RecordRelationshipType

RecordRelationshipType TRIM.SDK.TrimSearchClause.RecordRelationshipType
getset

For the record relationship search method, you also need to specify the relationship type parameter

◆ RecordReverseRelationshipType

RevRecRelationship TRIM.SDK.TrimSearchClause.RecordReverseRelationshipType
getset

For the record reverse relationship search method, you also need to specify the reverse relationship type parameter

◆ ShortParameterCaption

string TRIM.SDK.TrimSearchClause.ShortParameterCaption
get

For parameterized searches (non-blank parameter caption indicates the method should accept parameter values before being run) Gets a short string providing some help text regarding how to format the search parameter string for this clause.

◆ SingleUriCriteria

TrimURI TRIM.SDK.TrimSearchClause.SingleUriCriteria
get

Gets the current criteria value of a object search, if it is based on a single uri or object. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based).

◆ SubQueryObjectType

BaseObjectTypes TRIM.SDK.TrimSearchClause.SubQueryObjectType
getset

For some methods (e.g. the userLabel stuckOn search method), there is an extra parameter, a dynamic object type, used in conjunction with the a search specification for that object. For example, a search string could look like stuckOn:location, ["Simpson, David"], in which case/ the search is for labels attached to locations, matching the location sub-search.

◆ SubSearch

TrimSearchStack? TRIM.SDK.TrimSearchClause.SubSearch
get

Gets a TrimSearchStack that represents a sub-search. A sub-search can be used if the search clause is based on a criteria which represents one of more TRIM main objects, for example, searching for records based on assignee. The specification of the assignee can be a location search. This stack returned will be in reverse polish format which doesn't include any precedence operators. Note that the function will return NULL if the search criteria is not a sub search.

◆ TrimType

BaseObjectTypes TRIM.SDK.TrimSearchClause.TrimType
get

Gets a BaseObjectTypes enum value indicating the type of object in this collection.

◆ UriArrayCriteria

TrimURIList? TRIM.SDK.TrimSearchClause.UriArrayCriteria
get

Gets the current criteria value of a object search, if it is based on a uri Array. This should only be used for search clauses that have a parameter format of Object (see SearchClauseDef class for information on how to determine if a search clause is object based).