@Override public IConcept getSecurityParentConcept() { return getLogicalTable(); }
protected void removeLogicalColumnFromParentTable( ColumnBackedNode node ) { LogicalColumn lCol = node.getLogicalColumn(); if ( lCol != null && lCol.getLogicalTable() != null ) { LogicalTable lTab = lCol.getLogicalTable(); lTab.getLogicalColumns().remove( lCol ); } }
protected static LogicalColumn findCorrespondingOlapColumn( LogicalColumn relationalColumn, LogicalModel olapModel ) { LogicalTable olapTable = findCorrespondingOlapTable( relationalColumn.getLogicalTable(), olapModel ); if ( olapTable != null ) { for ( LogicalColumn col : olapTable.getLogicalColumns() ) { if ( col.getPhysicalColumn().getId().equals( relationalColumn.getPhysicalColumn().getId() ) ) { return col; } } } return null; }
List<Selection> cols = formula.getSelections(); for ( Selection selection : cols ) { LogicalTable businessTable = selection.getLogicalColumn().getLogicalTable(); treeSet.add( businessTable ); treeSet.add( selection.getLogicalColumn().getLogicalTable() );
@Override public void validate() { valid = true; validationMessages.clear(); // check name if ( name == null || "".equals( name ) ) { validationMessages .add( ModelerMessagesHolder.getMessages().getString( getValidationMessageKey( "MISSING_NAME" ) ) ); valid = false; } if ( logicalColumn == null ) { validationMessages.add( ModelerMessagesHolder.getMessages().getString( getValidationMessageKey( "MISSING_BACKING_COLUMN" ), getName() ) ); valid = false; } else { LogicalTable logicalTable = logicalColumn.getLogicalTable(); if ( logicalOrdinalColumn != null && !logicalOrdinalColumn.getLogicalTable().equals( logicalTable ) ) { validationMessages.add( ModelerMessagesHolder.getMessages().getString( getValidationMessageKey( "INVALID_TABLE_FOR_ORDINAL_COLUMN" ), getName() ) ); } if ( logicalCaptionColumn != null && !logicalCaptionColumn.getLogicalTable().equals( logicalTable ) ) { validationMessages.add( ModelerMessagesHolder.getMessages().getString( getValidationMessageKey( "INVALID_TABLE_FOR_CAPTION_COLUMN" ), getName() ) ); } } }
List<Selection> cols = formula.getSelections(); for ( Selection sel : cols ) { LogicalTable LogicalTable = sel.getLogicalColumn().getLogicalTable(); List<Selection> cols = formula.getSelections(); for ( Selection sel : cols ) { LogicalTable LogicalTable = sel.getLogicalColumn().getLogicalTable(); List<Selection> cols = formula.getSelections(); for ( Selection sel : cols ) { LogicalTable LogicalTable = sel.getLogicalColumn().getLogicalTable();
String tmpAliasName = LogicalTableToAliasMap.get( column.getLogicalColumn().getLogicalTable().getId() ); if ( tmpAliasName == null ) { tmpAliasName = aliasName;
businessTable = c.getLogicalTable();
usedBusinessTables.add( selections.get( 0 ).getLogicalColumn().getLogicalTable() );
@Override public Object onDrop( Object data ) throws ModelerException { try { MemberPropertyMetaData memberProp = null; if ( data instanceof AvailableField ) { ColumnBackedNode node = getWorkspace().createColumnBackedNode( (AvailableField) data, ModelerPerspective.ANALYSIS ); memberProp = getWorkspace().createMemberPropertyForParentWithNode( this, node ); } else if ( data instanceof MemberPropertyMetaData ) { memberProp = (MemberPropertyMetaData) data; memberProp.setParent( this ); } else { return null; } LogicalTable existingTable = getLogicalColumn().getLogicalTable(); LogicalColumn col = memberProp.getLogicalColumn(); if ( col == null ) { return null; } if ( col.getLogicalTable().getId() != existingTable.getId() ) { throw new IllegalStateException( ModelerMessagesHolder.getMessages().getString( "DROP.ERROR.MEMBER_PROP_FROM_DIFFERENT_TABLE" ) ); } return memberProp; } catch ( Exception e ) { throw new ModelerException( e ); } }
protected void populateCategories( ModelerWorkspace workspace ) { RelationalModelNode model = workspace.getRelationalModel(); LogicalModel logicalModel = workspace.getDomain().getLogicalModels().get( 0 ); logicalModel.getCategories().clear(); for ( CategoryMetaData catMeta : model.getCategories() ) { Category cat = new Category(); cat.setName( new LocalizedString( this.getLocale(), catMeta.getName() ) ); cat.setId( catMeta.getName() ); for ( FieldMetaData fieldMeta : catMeta ) { LogicalColumn lCol = fieldMeta.getLogicalColumn(); LogicalTable lTable = lCol.getLogicalTable(); if ( !lTable.getLogicalColumns().contains( lCol ) ) { lTable.addLogicalColumn( lCol ); } lCol.setName( new LocalizedString( locale, fieldMeta.getName() ) ); AggregationType type = fieldMeta.getDefaultAggregation(); lCol.setAggregationType( type ); setLogicalColumnFormat( fieldMeta.getFormat(), lCol ); Set<AggregationType> possibleAggs = new HashSet<AggregationType>(); possibleAggs.add( fieldMeta.getDefaultAggregation() ); possibleAggs.addAll( fieldMeta.getSelectedAggregations() ); lCol.setAggregationList( Arrays.<AggregationType>asList( possibleAggs .toArray( new AggregationType[possibleAggs.size()] ) ) ); cat.addLogicalColumn( lCol ); } logicalModel.addCategory( cat ); } }
Object factProp = col.getLogicalTable().getPhysicalTable().getProperty( "FACT_TABLE" ); if ( factProp == null || factProp.equals( Boolean.FALSE ) ) { throw new IllegalStateException( ModelerMessagesHolder.getMessages()
new AliasAwareSqlOpenFormula( LogicalModel, selection.getLogicalColumn().getLogicalTable(), databaseMeta, columnStr, selection.getAlias() ); formula.parseAndValidate(); String tblName = selection.getLogicalColumn().getLogicalTable().getId(); if ( !selection.getAlias().equals( DEFAULT_ALIAS ) ) { tblName += "_" + selection.getAlias(); //$NON-NLS-1$ new AliasedPathLogicalTable( tblName, selection.getLogicalColumn().getLogicalTable() ) ); } else { return new SQLAndAliasedTables( tableColumn, new AliasedPathLogicalTable( tblName, selection.getLogicalColumn() .getLogicalTable() ) );
modelElement = doc.createElement( "CWM:ModelElement.taggedValue" ); //$NON-NLS-1$ modelElement.appendChild( createTaggedValue( doc, "BUSINESS_COLUMN_BUSINESS_TABLE", column.getLogicalTable().getId(), idGen.getNextId() ) ); //$NON-NLS-1$ modelElement.appendChild( createTaggedValue( doc, "BUSINESS_COLUMN_PHYSICAL_COLUMN_NAME", column.getPhysicalColumn().getId(),
leftTableAlias = tableAliases.get( relation.getFromColumn().getLogicalTable() ); } else { leftTableAlias = relation.getFromColumn().getLogicalTable().getId(); rightTableAlias = tableAliases.get( relation.getToColumn().getLogicalTable() ); } else { rightTableAlias = relation.getToColumn().getLogicalTable().getId();
return null; LogicalTable existingTable = get( 0 ).getLogicalColumn().getLogicalTable(); if ( col.getLogicalTable().getId() != existingTable.getId() ) { throw new IllegalStateException( ModelerMessagesHolder.getMessages().getString( "DROP.ERROR.TWO_TABLES_IN_HIERARCHY" ) );
LogicalTable supposedLTable = lCol.getLogicalTable(); LogicalTable olapCloneLTable = findOlapCloneForTableInDomain( supposedLTable, domain ); lCol.setDescription( new LocalizedString( getLocale(), f.getDescription() ) ); LogicalTable lTable = lCol.getLogicalTable(); OlapMeasure measure = new OlapMeasure();
CategoryMetaData catMeta = new CategoryMetaData( catName ); for ( LogicalColumn col : cat.getLogicalColumns() ) { LogicalTable table = col.getLogicalTable();
DatabaseMeta databaseMeta, String locale ) { String targetColumn = (String) column.getLogicalColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ); LogicalTable logicalTable = column.getLogicalColumn().getLogicalTable(); if ( column.getLogicalColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN_TYPE ) == TargetColumnType.OPEN_FORMULA ) {