public IEnumerable <T> GetEntityByRelationType <T>(AbstractRelationType relationType, HiveId sourceId, params RelationMetaDatum[] metaDatum) where T : class, IRelatableEntity { throw new NotImplementedException(); }
public T GetByPath <T>(HiveId path, AbstractRelationType relationType = null, RevisionStatusType statusType = null) where T : TypedEntity { Mandate.ParameterNotEmpty(path, "path"); return(GetEntity <T>(path)); }
public static void AddRelation(this ICoreRelationsRepository session, IRelatableEntity source, IRelatableEntity destination, AbstractRelationType relationType, int ordinal, params RelationMetaDatum[] metaData) { session.AddRelation(new Relation(relationType, source, destination, ordinal, metaData)); }
public static void AddRelation(this ICoreRelationsRepository session, HiveId sourceId, HiveId destinationId, AbstractRelationType relationType, int ordinal, params RelationMetaDatum[] metaData) { session.AddRelation(new Relation(relationType, sourceId, destinationId, ordinal, metaData)); }
protected RelationById(AbstractRelationType type, int ordinal, params RelationMetaDatum[] metaData) { Type = type; Ordinal = ordinal; MetaData = new RelationMetaDataCollection(metaData); }
public LazyRelation(ICoreReadonlyRepository <TRelatable> sourceRepo, ICoreReadonlyRepository <TRelatable> destinationRepo, AbstractRelationType type, HiveId sourceId, HiveId destinationId, int ordinal, params RelationMetaDatum[] metaData) : base(type, sourceId, destinationId, ordinal, metaData) { IsLoaded = false; _sourceRepo = sourceRepo; _destinationRepo = destinationRepo; }
public LazyRelation(ICoreReadonlyRepository <TRelatable> sourceRepo, AbstractRelationType type, HiveId sourceId, HiveId destinationId, int ordinal, params RelationMetaDatum[] metaData) : this(sourceRepo, sourceRepo, type, sourceId, destinationId, ordinal, metaData) { }
public T GetByPath <T>(HiveId path, AbstractRelationType relationType, RevisionStatusType statusType) where T : TypedEntity { throw new NotImplementedException(); }
/// <summary> /// Creates a deep copy of an object and adds the copied children to the repository. Does not add the root duplicate to the repo, the caller should do this. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="original">The original.</param> /// <param name="newParent">The new parent.</param> /// <param name="relationType">Type of the relation.</param> /// <param name="ordinal">The ordinal.</param> /// <param name="unitOfWork">The unit of work.</param> /// <param name="metaData">The meta data.</param> /// <returns></returns> public static T CreateDeepCopyToNewParentInRepo <T>(this T original, IRelatableEntity newParent, AbstractRelationType relationType, int ordinal, IGroupUnit <IProviderTypeFilter> unitOfWork, params RelationMetaDatum[] metaData) where T : TypedEntity, new() { Mandate.ParameterNotNull(newParent, "newParent"); Mandate.ParameterNotNull(relationType, "relationType"); var copy = CreateCopyAndEnlistChildren(original, unitOfWork); // We've been given a new parent so add that to the copied item's relatinproxies copy.RelationProxies.EnlistParent(newParent, relationType, ordinal, metaData); return(copy); }