C# Class Azavea.Open.DAO.Memory.AbstractMemoryIndex

Base class that handles some of the key comparison common across index types.
Inheritance: IMemoryIndex
Afficher le fichier Open project: azavea/net-dao

Protected Properties

Свойство Type Description
_daLayer MemoryDaLayer
_property string

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Method Details

AbstractMemoryIndex() protected méthode

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.
Résultat System

GetCardinality() public abstract méthode

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.
Résultat int

GetExpressionsForIndex() protected méthode

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.
Résultat IList

GetMatchingKeys() protected méthode

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.
Résultat IList

GetPossibleMatches() public abstract méthode

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.
Résultat IList

Rebuild() public abstract méthode

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.
Résultat void

SplitObjectsByProperty() protected méthode

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.
Résultat IList>.IDictionary

Property Details

_daLayer protected_oe property

Data access layer we're using, necessary for type coercion.
protected MemoryDaLayer,Azavea.Open.DAO.Memory _daLayer
Résultat MemoryDaLayer

_property protected_oe property

The property that this index is on.
protected string _property
Résultat string