42 lines
1.6 KiB
C#
42 lines
1.6 KiB
C#
using System;
|
|
using System.Collections;
|
|
|
|
namespace BCG
|
|
{
|
|
/// <summary>
|
|
/// List where all the rows are mantained, both the referencing and the referced tables.
|
|
/// </summary>
|
|
public interface ILightForeignJoinRowList : IEnumerable
|
|
{
|
|
/// <summary>
|
|
/// Adds the row, and returns the node associated with the row (in the most simple of implementations
|
|
/// it should be the previous row, to make deletions easier)
|
|
/// </summary>
|
|
/// <param name="r">row to be added</param>
|
|
/// <param name="isReD">boolean indicating if its a referenceD row or referncinG</param>
|
|
/// <returns>Associated node (can be the node to which the row was added, previous etc, depending on implementaion)</returns>
|
|
INode add (IBlueRow r, bool isReD);
|
|
/// <summary>
|
|
/// Removes the row from the row, id is becomes irrelavant when isRed is true, as theres only one row of that kind
|
|
/// in the list
|
|
/// </summary>
|
|
/// <param name="n">Node associated with the row</param>
|
|
/// <param name="id">id of the row to be deleted</param>
|
|
void remove (INode n, bool isReD, int id);
|
|
/// <summary>
|
|
/// returns the number of elements in the list
|
|
/// </summary>
|
|
int count {get;}
|
|
/// <summary>
|
|
/// Node containing the referencedRow
|
|
/// </summary>
|
|
IBlueRow? referencedRow { get; }
|
|
|
|
/// <summary>
|
|
/// removes all referenced or referencing nodes (indicated by the bool), p.s. theres only one referenced row
|
|
/// </summary>
|
|
/// <param name="isReD"></param>
|
|
void removeAll (bool isReD);
|
|
}
|
|
}
|