Search in sources :

Example 11 with JoinTableModel

use of org.pentaho.agilebi.modeler.models.JoinTableModel in project data-access by pentaho.

the class MultitableGuiModel method createMultiTableDatasourceDTO.

public MultiTableDatasourceDTO createMultiTableDatasourceDTO(String dsName) {
    MultiTableDatasourceDTO dto = new MultiTableDatasourceDTO();
    dto.setDoOlap(this.doOlap);
    dto.setDatasourceName(dsName);
    List<String> selectedTables = new ArrayList<String>();
    for (JoinTableModel tbl : this.selectedTables) {
        selectedTables.add(tbl.getName());
    }
    dto.setSelectedTables(selectedTables);
    SchemaModel schema = new SchemaModel();
    schema.setJoins(this.getJoins());
    schema.setFactTable(this.factTable);
    dto.setSchemaModel(schema);
    return dto;
}
Also used : MultiTableDatasourceDTO(org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MultiTableDatasourceDTO) JoinTableModel(org.pentaho.agilebi.modeler.models.JoinTableModel) SchemaModel(org.pentaho.agilebi.modeler.models.SchemaModel) ArrayList(java.util.ArrayList) LocalizedString(org.pentaho.metadata.model.concept.types.LocalizedString)

Aggregations

JoinTableModel (org.pentaho.agilebi.modeler.models.JoinTableModel)11 ArrayList (java.util.ArrayList)6 JoinRelationshipModel (org.pentaho.agilebi.modeler.models.JoinRelationshipModel)4 JoinFieldModel (org.pentaho.agilebi.modeler.models.JoinFieldModel)3 SchemaModel (org.pentaho.agilebi.modeler.models.SchemaModel)3 LocalizedString (org.pentaho.metadata.model.concept.types.LocalizedString)3 BindingFactory (org.pentaho.ui.xul.binding.BindingFactory)2 GwtBindingFactory (org.pentaho.ui.xul.gwt.binding.GwtBindingFactory)2 AbstractModelList (org.pentaho.ui.xul.util.AbstractModelList)2 Collection (java.util.Collection)1 HashSet (java.util.HashSet)1 List (java.util.List)1 MultiTableDatasourceDTO (org.pentaho.platform.dataaccess.datasource.wizard.service.impl.MultiTableDatasourceDTO)1 XulException (org.pentaho.ui.xul.XulException)1 BindingConvertor (org.pentaho.ui.xul.binding.BindingConvertor)1 XulMenuList (org.pentaho.ui.xul.components.XulMenuList)1