Micro Focus Content Manager SDK 9.3
HP.HPTRIM.SDK.TrimSearchClause Class Reference

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

Inheritance diagram for HP.HPTRIM.SDK.TrimSearchClause:
HP.HPTRIM.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...
 
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...
 
FieldDefinition Field [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...
 
TrimURIList 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). 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...
 
TrimSearchStack 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. 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 HP.HPTRIM.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

HP.HPTRIM.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.

HP.HPTRIM.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

TrimDateTime HP.HPTRIM.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.

TrimDateTime HP.HPTRIM.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.

bool HP.HPTRIM.SDK.TrimSearchClause.ItemMatches ( TrimObject  trimObject)

Determines if the specified object matches the criteria for this search

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

bool HP.HPTRIM.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.

bool HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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.

void HP.HPTRIM.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

int HP.HPTRIM.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.

SearchClauseIds HP.HPTRIM.SDK.TrimSearchClause.ClauseId
get

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

ComparisonType HP.HPTRIM.SDK.TrimSearchClause.ComparisonOperator
get

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

string HP.HPTRIM.SDK.TrimSearchClause.CriteriaString
get

Gets a string value representing the criteria for this clause.

Database HP.HPTRIM.SDK.TrimSearchClause.Database
get

Gets the TRIM Database object in which this collection resides.

TrimException HP.HPTRIM.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.

string HP.HPTRIM.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.

FieldDefinition HP.HPTRIM.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).

bool HP.HPTRIM.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).

bool HP.HPTRIM.SDK.TrimSearchClause.IsNegated
getset

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

bool HP.HPTRIM.SDK.TrimSearchClause.IsRecursive
get

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

bool HP.HPTRIM.SDK.TrimSearchClause.IsSubSearch
get

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

string HP.HPTRIM.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.

string HP.HPTRIM.SDK.TrimSearchClause.ParameterToolTip
get

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

RecordRelationshipType HP.HPTRIM.SDK.TrimSearchClause.RecordRelationshipType
getset

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

RevRecRelationship HP.HPTRIM.SDK.TrimSearchClause.RecordReverseRelationshipType
getset

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

string HP.HPTRIM.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.

TrimURI HP.HPTRIM.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).

BaseObjectTypes HP.HPTRIM.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.

TrimSearchStack HP.HPTRIM.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.

BaseObjectTypes HP.HPTRIM.SDK.TrimSearchClause.TrimType
get

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

TrimURIList HP.HPTRIM.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).