GetColumn() public abstract method

public abstract GetColumn ( Type type, string columnName, bool isPrimaryKeyColumn ) : SqlColumnExpression
type System.Type
columnName string
isPrimaryKeyColumn bool
return SqlColumnExpression
    private ResolvedJoinInfo CreateResolvedJoinInfo (
        SqlEntityExpression originatingEntity,
        string leftColumnName,
        Type leftColumnType,
        bool leftColumnIsPrimaryKey,
        IResolvedTableInfo joinedTableInfo,
        string rightColumnName,
        Type rightColumnType,
        bool rightColumnIsPrimaryKey)
    {
      var leftColumn = originatingEntity.GetColumn (leftColumnType, leftColumnName, leftColumnIsPrimaryKey);
      var rightColumn = CreateColumn (rightColumnType, joinedTableInfo.TableAlias, rightColumnName, rightColumnIsPrimaryKey);

      return new ResolvedJoinInfo (
          joinedTableInfo, ConversionUtility.MakeBinaryWithOperandConversion (ExpressionType.Equal, leftColumn, rightColumn, false, null));
    }
    public virtual Expression ResolveMemberExpression (SqlEntityExpression originatingEntity, MemberInfo memberInfo)
    {
      var memberType = ReflectionUtility.GetMemberReturnType (memberInfo);
      if (memberInfo.DeclaringType == typeof (Cook))
      {
        switch (memberInfo.Name)
        {
          case "ID":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, true);
          case "FirstName":
          case "Name":
          case "IsFullTimeCook":
          case "IsStarredCook":
          case "Weight":
          case "SpecificInformation":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
          case "KnifeID":
            return CreateMetaIDExpression (
                originatingEntity.GetColumn (typeof (int), "KnifeID", false), 
                originatingEntity.GetColumn (typeof (string), "KnifeClassID", false));
          case "Substitution":
          case "Substituted":
          case "Kitchen":
          case "Knife":
            return new SqlEntityRefMemberExpression (originatingEntity, memberInfo);
        }
      }
      else if (memberInfo.DeclaringType == typeof (ISpecificCook))
      {
        switch (memberInfo.Name)
        {
          case "SpecificInformation":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
        }
      }
      else if (memberInfo.DeclaringType == typeof (Chef))
      {
        switch (memberInfo.Name)
        {
          case "LetterOfRecommendation":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
        }
      }
      else if (memberInfo.DeclaringType == typeof (Kitchen))
      {
        switch (memberInfo.Name)
        {
          case "ID":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, true);
          case "Name":
          case "RoomNumber":
          case "LastCleaningDay":
          case "PassedLastInspection":
          case "LastInspectionScore":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
          case "Cook":
          case "Restaurant":
            return new SqlEntityRefMemberExpression (originatingEntity, memberInfo);
        }
      }
      else if (memberInfo.DeclaringType == typeof (Restaurant))
      {
        switch (memberInfo.Name)
        {
          case "ID":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, true);
          case "SubKitchen":
          case "CompanyIfAny":
            return new SqlEntityRefMemberExpression (originatingEntity, memberInfo);
        }
      }
      else if (memberInfo.DeclaringType == typeof (Company))
      {
        switch (memberInfo.Name)
        {
          case "ID":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, true);
          case "DateOfIncorporation":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
        }
      }
      else if (memberInfo.DeclaringType == typeof (Knife))
      {
        switch (memberInfo.Name)
        {
          case "ID":
            return CreateMetaIDExpression (
                originatingEntity.GetColumn (typeof (int), "ID", true), 
                originatingEntity.GetColumn (typeof (string), "ClassID", true));
          case "Sharpness":
            return originatingEntity.GetColumn (memberType, memberInfo.Name, false);
        }
      }

      throw new UnmappedItemException ("Cannot resolve member: " + memberInfo);
    }