Example #1
0
 public virtual void addReferColumn(ColumnMetaData columnMetaData)
 {
     if (!referColumns.Contains(columnMetaData))
     {
         referColumns.Add(columnMetaData);
     }
 }
Example #2
0
        public virtual ColumnMetaData getColumnMetaData(TableMetaData tableMetaData, string columnName)
        {
            ColumnMetaData columnMetaData = new ColumnMetaData();

            columnMetaData.Name  = columnName;
            columnMetaData.Table = tableMetaData;

            if (dlineage.MetaData[tableMetaData] == null)
            {
                return(null);
            }
            int index = dlineage.MetaData[tableMetaData].IndexOf(columnMetaData);

            if (index != -1)
            {
                columnMetaData = dlineage.MetaData[tableMetaData][index];
            }
            else
            {
                return(null);
            }
            return(columnMetaData);
        }
Example #3
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (!(obj is ColumnMetaData))
            {
                return(false);
            }
            ColumnMetaData other = (ColumnMetaData)obj;

            if (string.ReferenceEquals(name, null))
            {
                if (!string.ReferenceEquals(other.name, null))
                {
                    return(false);
                }
            }
            else if (!name.Equals(other.name))
            {
                return(false);
            }
            if (table == null)
            {
                if (other.table != null)
                {
                    return(false);
                }
            }
            else if (!table.Equals(other.table))
            {
                return(false);
            }
            return(true);
        }