public void AddRelation(IReadonlyRelation <IRelatableEntity, IRelatableEntity> item) { ExecuteInCancellableTask(item, TaskTriggers.Hive.Relations.PreRelationAdded, TaskTriggers.Hive.Relations.PostRelationAdded, () => ChildSessions.AddRelation(item, IdRoot)); }
public void RemoveRelation(IRelationById item) { ExecuteInCancellableTask(item, TaskTriggers.Hive.Relations.PreRelationRemoved, TaskTriggers.Hive.Relations.PostRelationRemoved, () => ChildSessions.RemoveRelation(item)); ; }
public IEnumerable <IRelationById> GetParentRelations(HiveId childId, RelationType relationType) { return(UnitScopedCache.GetOrCreateTyped( "erg_GetParentRelations" + childId + (relationType != null ? relationType.RelationName : "any_relationtype"), () => ChildSessions.GetParentRelations(childId, IdRoot, relationType))); }
public void Delete <TEntity>(HiveId id) where TEntity : TypedEntity { FrameworkContext.TaskManager.ExecuteInCancellableTask(this, id, TaskTriggers.Hive.PreDelete, TaskTriggers.Hive.PostDelete, () => ChildSessions.Delete(id), x => new HiveEntityPreDeletionEventArgs(x, UnitScopedCache), x => new HiveEntityPostDeletionEventArgs(x, UnitScopedCache), FrameworkContext); }
public void AddOrUpdate(TypedEntity entity) { ExecuteInCancellableTask(entity, TaskTriggers.Hive.PreAddOrUpdate, TaskTriggers.Hive.PostAddOrUpdate, () => ChildSessions.AddOrUpdate(entity, IdRoot)); }
public void AddRelation(IReadonlyRelation <IRelatableEntity, IRelatableEntity> item) { ChildSessions.AddRelation(item, IdRoot); }
public IRelationById FindRelation(HiveId sourceId, HiveId destinationId, RelationType relationType) { return(ChildSessions.FindRelation(sourceId, destinationId, IdRoot, relationType)); }
public IEnumerable <IRelationById> GetChildRelations(HiveId parentId, RelationType relationType) { return(ChildSessions.GetChildRelations(parentId, IdRoot, relationType)); }
public IEnumerable <IRelationById> GetParentRelations(HiveId childId, RelationType relationType) { return(ChildSessions.GetParentRelations(childId, IdRoot, relationType)); }
public void Delete <TEntity>(HiveId id) where TEntity : AbstractSchemaPart { ChildSessions.Delete <TEntity>(id); }
public void AddOrUpdate(AbstractSchemaPart entity) { ChildSessions.AddOrUpdate(entity, IdRoot); }
public bool Exists <TEntity>(HiveId id) where TEntity : AbstractSchemaPart { return(ChildSessions.Exists <TEntity>(id)); }
public IEnumerable <TEntity> GetAll <TEntity>() where TEntity : AbstractSchemaPart { return(ChildSessions.GetAll <TEntity>(this, IdRoot)); }
/// <summary> /// Gets a sequence of <see cref="TEntity"/> matching the specified ids. /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> /// <param name="allOrNothing">If set to <c>true</c> all ids must match in order to return any <typeparamref name="TEntity"/> instances.</param> /// <param name="ids">The ids.</param> /// <returns></returns> public IEnumerable <TEntity> Get <TEntity>(bool allOrNothing, params HiveId[] ids) where TEntity : AbstractSchemaPart { return(ChildSessions.Get <TEntity>(this, allOrNothing, IdRoot, ids)); }
public void RemoveRelation(IRelationById item) { ChildSessions.RemoveRelation(item); }
public IEnumerable <IRelationById> GetAncestorRelations(HiveId descendentId, RelationType relationType) { return(UnitScopedCache.GetOrCreateTyped( "erg_GetAncestorRelations" + descendentId + (relationType != null ? relationType.RelationName : "any_relationtype"), () => ChildSessions.GetAncestorRelations(descendentId, IdRoot, relationType))); }
public IEnumerable <IRelationById> GetDescendentRelations(HiveId ancestorId, RelationType relationType) { return(ChildSessions.GetDescendentRelations(ancestorId, IdRoot, relationType)); }
public IEnumerable <TEntity> GetAll <TEntity>() where TEntity : TypedEntity { return(ChildSessions.GetAll <TEntity>(this, IdRoot)); }
public IEnumerable <IRelationById> GetBranchRelations(HiveId siblingId, RelationType relationType = null) { return(ChildSessions.GetBranchRelations(siblingId, IdRoot, relationType)); }
/// <summary> /// Gets a sequence of <see cref="TEntity"/> matching the specified ids. /// </summary> /// <typeparam name="TEntity">The type of the entity.</typeparam> /// <param name="allOrNothing">If set to <c>true</c> all ids must match in order to return any <typeparamref name="TEntity"/> instances.</param> /// <param name="ids">The ids.</param> /// <returns></returns> public IEnumerable <TEntity> Get <TEntity>(bool allOrNothing, params HiveId[] ids) where TEntity : TypedEntity { return(ChildSessions.Get <TEntity>(this, allOrNothing, IdRoot, ids).Select(RaiseEntityReady)); }
public IEnumerable <TEntity> GetAll <TEntity>() where TEntity : TypedEntity { return(ChildSessions.GetAll <TEntity>(this, IdRoot).Select(RaiseEntityReady)); }
public bool Exists <TEntity>(HiveId id) where TEntity : TypedEntity { return(ChildSessions.Exists <TEntity>(id)); }
protected override void DisposeResources() { ChildSessions.Dispose(); }
public void Delete <TEntity>(HiveId id) where TEntity : TypedEntity { ChildSessions.Delete(id); }