Esempio n. 1
0
  public LogicalColumn findLogicalColumn(IPhysicalColumn column, ModelerPerspective perspective) {
    LogicalColumn col = null;
    IPhysicalTable physicalTable = column.getPhysicalTable();
    LogicalModel logicalModel = this.getLogicalModel(perspective);
    if (logicalModel == null) {
      return col;
    }
    for (LogicalTable table : logicalModel.getLogicalTables()) {
      if (table.getPhysicalTable().getId().equals(physicalTable.getId())) {
        if ((perspective == ModelerPerspective.ANALYSIS
                && table.getId().endsWith(BaseModelerWorkspaceHelper.OLAP_SUFFIX))
            || (perspective == ModelerPerspective.REPORTING
                && !table.getId().endsWith(BaseModelerWorkspaceHelper.OLAP_SUFFIX))) {

          for (LogicalColumn lCol : table.getLogicalColumns()) {
            if (lCol.getPhysicalColumn().getId().equals(column.getId())) {
              return lCol;
            }
          }
        }
      }
    }

    return col;
  }
  public boolean isSameUnderlyingPhysicalColumn(IPhysicalColumn column) {
    IPhysicalTable table = column.getPhysicalTable();

    return getPhysicalColumn().getId().equals(column.getId())
        && getPhysicalColumn().getPhysicalTable().getId().equals(table.getId());
  }
 public AvailableField(IPhysicalColumn physicalColumn) {
   setPhysicalColumn(physicalColumn);
   setName(physicalColumn.getName(LocalizedString.DEFAULT_LOCALE));
   setImage(FIELD_IMAGE);
 }