using System; using System.Collections.Generic; using ln.objects.catalog; namespace ln.types.odb.ng.index { public abstract class Index { public string IndexName { get; protected set; } public Path IndexPath { get; protected set; } protected Index() { } protected Index(Path indexPath) :this() { IndexPath = indexPath; IndexName = IndexPath.Complete; } public virtual void Replace(Guid documentID, ODBEntity value) { Remove(documentID); Add(documentID, value); } public abstract void Add(Guid documentID, ODBEntity value); public abstract void Remove(Guid documentID); public abstract IEnumerable GetDocumentIDs(Predicate predicate); public abstract bool LoadIndex(string basePath, long lastCloseTimestamp); public abstract bool SaveIndex(string basePath, long lastCloseTimestamp); } }