C# Класс Azavea.Open.DAO.Memory.AbstractMemoryIndex

Base class that handles some of the key comparison common across index types.
Наследование: IMemoryIndex
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_daLayer MemoryDaLayer
_property string

Открытые методы

Метод Описание
GetCardinality ( DaoCriteria crit ) : int

Returns a number indicating how many breaks this index has for the properties used in the criteria. Roughly speaking, higher is better (though the number is an estimate, it is possible to have data that makes the index inefficient). If there are multiple indexes, the one that returns the highest number from this method will be used. An index should return 1 to indicate that it offers no value for this criteria.

GetPossibleMatches ( DaoCriteria crit ) : IList

Uses the index to return the smallest number of possible matches for this criteria.

Rebuild ( IEnumerable objects ) : void

This method rebuilds the index given a new list of data objects.

Защищенные методы

Метод Описание
AbstractMemoryIndex ( MemoryDaLayer layer, string property ) : System

Base class that handles some of the key comparison common across index types.

GetExpressionsForIndex ( DaoCriteria crit ) : IList

This returns none if the crit is ORed, or if there are no expressions on this index's property.

GetMatchingKeys ( DaoCriteria crit, IEnumerable allKeys ) : IList

Gets the keys that match the expressions that are relevent to this index.

SplitObjectsByProperty ( IEnumerable objects ) : IList>.IDictionary

Splits a list of objects into a bunch of lists, one for each value of the index's property.

Описание методов

AbstractMemoryIndex() защищенный Метод

Base class that handles some of the key comparison common across index types.
protected AbstractMemoryIndex ( MemoryDaLayer layer, string property ) : System
layer MemoryDaLayer The data access layer in use.
property string The property to index on.
Результат System

GetCardinality() публичный абстрактный Метод

Returns a number indicating how many breaks this index has for the properties used in the criteria. Roughly speaking, higher is better (though the number is an estimate, it is possible to have data that makes the index inefficient). If there are multiple indexes, the one that returns the highest number from this method will be used. An index should return 1 to indicate that it offers no value for this criteria.
public abstract GetCardinality ( DaoCriteria crit ) : int
crit Azavea.Open.DAO.Criteria.DaoCriteria The query being run.
Результат int

GetExpressionsForIndex() защищенный Метод

This returns none if the crit is ORed, or if there are no expressions on this index's property.
protected GetExpressionsForIndex ( DaoCriteria crit ) : IList
crit Azavea.Open.DAO.Criteria.DaoCriteria The query being run.
Результат IList

GetMatchingKeys() защищенный Метод

Gets the keys that match the expressions that are relevent to this index.
protected GetMatchingKeys ( DaoCriteria crit, IEnumerable allKeys ) : IList
crit Azavea.Open.DAO.Criteria.DaoCriteria The query being run.
allKeys IEnumerable All the key values in the index.
Результат IList

GetPossibleMatches() публичный абстрактный Метод

Uses the index to return the smallest number of possible matches for this criteria.
public abstract GetPossibleMatches ( DaoCriteria crit ) : IList
crit Azavea.Open.DAO.Criteria.DaoCriteria The query being run.
Результат IList

Rebuild() публичный абстрактный Метод

This method rebuilds the index given a new list of data objects.
public abstract Rebuild ( IEnumerable objects ) : void
objects IEnumerable All the objects in the data store.
Результат void

SplitObjectsByProperty() защищенный Метод

Splits a list of objects into a bunch of lists, one for each value of the index's property.
protected SplitObjectsByProperty ( IEnumerable objects ) : IList>.IDictionary
objects IEnumerable A list of potentially unordered objects.
Результат IList>.IDictionary

Описание свойств

_daLayer защищенное свойство

Data access layer we're using, necessary for type coercion.
protected MemoryDaLayer,Azavea.Open.DAO.Memory _daLayer
Результат MemoryDaLayer

_property защищенное свойство

The property that this index is on.
protected string _property
Результат string