C# Class GSoft.Dynamite.Repositories.QueryHelper

Utility to help build SPQuery filter strings
Inheritance: IQueryHelper
Afficher le fichier Open project: GSoft-SharePoint/Dynamite-2010

Private Properties

Свойство Type Description
GetAllWssIdByTerm string
TrimIfNotNullOrEmpty string

Méthodes publiques

Méthode Description
QueryHelper ( ITaxonomyService taxonomyService, ILogger logger ) : System

Initializes a new instance of the QueryHelper class.

TermFilter ( SPList list, string taxonomyFieldInternalName, IList terms, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term

TermFilter ( SPList list, string taxonomyFieldInternalName, Term term, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term

TermFilter ( SPList list, string taxonomyFieldInternalName, string termSetName, string termLabel, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term from the site-collection-reserved term store group

TermFilter ( SPList list, string taxonomyFieldInternalName, string termStoreGroupName, string termSetName, string termLabel, bool includeDescendants ) : string

Generates a SPQuery filter for Taxonomy Term in a global farm term store group

ViewFieldsForEntityType ( Type entityType ) : string

Returns a string corresponding the the ViewFields attribute of a SPQuery with all the properties of a particular Entity

Private Methods

Méthode Description
GetAllWssIdByTerm ( SPList list, Term term, bool includeDescendants ) : string
TrimIfNotNullOrEmpty ( string toTrim ) : string

Method Details

QueryHelper() public méthode

Initializes a new instance of the QueryHelper class.
public QueryHelper ( ITaxonomyService taxonomyService, ILogger logger ) : System
taxonomyService ITaxonomyService The taxonomy service.
logger ILogger The logger.
Résultat System

TermFilter() public méthode

Generates a SPQuery filter for Taxonomy Term
public TermFilter ( SPList list, string taxonomyFieldInternalName, IList terms, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
terms IList List of terms for why we want to match in an OR fashion
includeDescendants bool Whether the Term's child terms should be query hits as well
Résultat string

TermFilter() public méthode

Generates a SPQuery filter for Taxonomy Term
public TermFilter ( SPList list, string taxonomyFieldInternalName, Term term, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
term Term Term to match for
includeDescendants bool Whether the Term's child terms should be query hits as well
Résultat string

TermFilter() public méthode

Generates a SPQuery filter for Taxonomy Term from the site-collection-reserved term store group
public TermFilter ( SPList list, string taxonomyFieldInternalName, string termSetName, string termLabel, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
termSetName string Name of the term set
termLabel string Label by which to find the term (dupes not supported)
includeDescendants bool Whether the Term's child terms should be query hits as well
Résultat string

TermFilter() public méthode

Generates a SPQuery filter for Taxonomy Term in a global farm term store group
public TermFilter ( SPList list, string taxonomyFieldInternalName, string termStoreGroupName, string termSetName, string termLabel, bool includeDescendants ) : string
list SPList The list over which the query will be done
taxonomyFieldInternalName string The name of the site column associated with the term set
termStoreGroupName string Name of the global farm term store group
termSetName string Name of the term set
termLabel string Label by which to find the term (dupes not supported)
includeDescendants bool Whether the Term's child terms should be query hits as well
Résultat string

ViewFieldsForEntityType() public méthode

Returns a string corresponding the the ViewFields attribute of a SPQuery with all the properties of a particular Entity
public ViewFieldsForEntityType ( Type entityType ) : string
entityType System.Type The type of the entity
Résultat string