private LogicalTable findFactTable( String table, LogicalModel logicalModel ) { LogicalTable factTable = null; for ( LogicalTable lTable : logicalModel.getLogicalTables() ) { if ( lTable.getId().endsWith( BaseModelerWorkspaceHelper.OLAP_SUFFIX ) ) { Object prop = lTable.getPhysicalTable().getProperty( "target_table" ); if ( prop != null && prop.equals( table ) ) { factTable = lTable; break; } } } return factTable; }
private boolean isFactTable( IPhysicalTable table ) { String agileBiVersion = (String) getWorkspace().getLogicalModel( ModelerPerspective.ANALYSIS ).getProperty( "AGILE_BI_VERSION" ); if ( agileBiVersion != null && Float.parseFloat( agileBiVersion ) >= 2.0 ) { // if we're in a multi-table mode check for a fact table if ( getWorkspace().getAvailableTables().size() > 1 ) { Object factProp = table.getProperty( "FACT_TABLE" ); if ( factProp == null || factProp.equals( Boolean.FALSE ) ) { return false; } else { return true; } } } return false; }
private void addFieldsToTables( Domain domain, AbstractModelList<JoinTableModel> availableTables ) { String locale = LocalizedString.DEFAULT_LOCALE; Outter: for ( JoinTableModel table : availableTables ) { for ( LogicalTable tbl : domain.getLogicalModels().get( 0 ).getLogicalTables() ) { if ( tbl.getPhysicalTable().getProperty( "target_table" ).equals( table.getName() ) ) { for ( LogicalColumn col : tbl.getLogicalColumns() ) { JoinFieldModel field = new JoinFieldModel(); field.setName( col.getName( locale ) ); field.setParentTable( table ); table.getFields().add( field ); } continue Outter; } } } }
Object factProp = col.getLogicalTable().getPhysicalTable().getProperty( "FACT_TABLE" ); if ( factProp == null || factProp.equals( Boolean.FALSE ) ) { throw new IllegalStateException( ModelerMessagesHolder.getMessages()
if ( logicalTable.getPhysicalTable().getProperty( "target_table" ).equals( lTable ) ) { fromTable = logicalTable; if ( logicalTable.getPhysicalTable().getProperty( "target_table" ).equals( rTable ) ) { toTable = logicalTable;
Object prop; for ( LogicalTable lTable : logicalModel.getLogicalTables() ) { prop = lTable.getPhysicalTable().getProperty( "FACT_TABLE" ); if ( prop == null ) { continue;
Boolean isFact = (Boolean) table.getProperty( "FACT_TABLE" ); items.add( new AvailableTable( table, isFact == null ? false : isFact.booleanValue() ) );
boolean isFact = table.getProperty( "FACT_TABLE" ) != null ? (Boolean) table.getProperty( "FACT_TABLE" ) : false; items.add( new AvailableTable( table, isFact ) );