Table of Contents

Class GroupFilterCondition

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

GroupFilterCondition model the logic that govern a GroupFilter and can be used to specify the type of operator (AND and OR) to use when searching for entities. GroupFilterCondition are structured in hierarchical tree.

public class GroupFilterCondition : Search, IEntity
Inheritance
GroupFilterCondition
Implements
Inherited Members

Constructors

GroupFilterCondition()

Initializes a new instance of the GroupFilterCondition class.Constructor

public GroupFilterCondition()

GroupFilterCondition(Group)

Initializes a new instance of the GroupFilterCondition class from a Group.Constructor.

public GroupFilterCondition(Group group)

Parameters

group Group

the group

GroupFilterCondition(Id)

Initializes a new instance of the GroupFilterCondition class.Constructor.

public GroupFilterCondition(Id id)

Parameters

id Id

the id.

GroupFilterCondition(IList<Group>, SearchRelation, bool)

Initializes a new instance of the GroupFilterCondition class from an IList of Groups.Constructor.

public GroupFilterCondition(IList<Group> groups, SearchRelation relation, bool isNegated = false)

Parameters

groups IList<Group>

A collection of Groups to create the filter condition from

relation SearchRelation

The relation for the Groups

isNegated bool

Not Operator

Properties

GroupFilterConditions

Gets or sets the groups.

public IList<GroupFilterCondition>? GroupFilterConditions { get; set; }

Property Value

IList<GroupFilterCondition>

The value

GroupFilterId

Gets or sets Parent.

public Id? GroupFilterId { get; set; }

Property Value

Id

The value

GroupId

Gets or sets group id.

public Id? GroupId { get; set; }

Property Value

Id

The value

IncludeGroups

Gets or sets IncludeGroups for ZoneSearch only.

public IncludeGroups? IncludeGroups { get; set; }

Property Value

IncludeGroups?

The value

IsNegated

Gets or sets a value indicating whether Not filter is applied to nested property GroupFilterConditions or single group GroupId. If true, entities in specified groups or nested groupFilterConditions will be excluded from the search results.

public bool IsNegated { get; set; }

Property Value

bool

The value

Parent

Gets or sets Parent.

public GroupFilterCondition? Parent { get; set; }

Property Value

GroupFilterCondition

The value

Relation

Gets or sets how to search the group relations.

public SearchRelation? Relation { get; set; }

Property Value

SearchRelation?

The value

Methods

Combine(GroupFilterCondition, SearchRelation)

Combine another GroupFilterCondition with this one by joining them with a given operator

public GroupFilterCondition Combine(GroupFilterCondition condition, SearchRelation topLevelRelation)

Parameters

condition GroupFilterCondition

The GroupFilterCondition to combine with this one

topLevelRelation SearchRelation

The SearchRelation operator to combine the conditions with

Returns

GroupFilterCondition

A new GroupFilterCondition that is the combination of the two input conditions, joined by the given operator

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetGroupIds()

Gets the unique groupIds from the filter in a flattened list.

public IEnumerable<Id> GetGroupIds()

Returns

IEnumerable<Id>

An IEnumerable of group Ids

GetGroups(bool)

Gets the unique groups into a flattened list.

public IList<Group> GetGroups(bool populateFields = false)

Parameters

populateFields bool

Whether to populate all the group fields.

Returns

IList<Group>

A list of slim by default which populates only the Id field. Otherwise, populates all the fields.

GetHashCode()

public override int GetHashCode()

Returns

int

IsEmpty()

Is Empty.

public bool IsEmpty()

Returns

bool

Empty if Id and relation are null

ToString()

public override string ToString()

Returns

string