Examples of DataColumn


Examples of com.googlecode.g2re.domain.DataColumn

        /* Create a jdbc sql query and add to the report */
        JdbcQuery queryA = new JdbcQuery();
        queryA.setDataConnection(conn);
        queryA.setName("PetLocationQuery");
        queryA.setSqlQuery(sqlA);
        DataColumn col1 = new DataColumn("Name", 0, DataType.STRING);
        DataColumn col2 = new DataColumn("Description", 1, DataType.STRING);
        DataColumn col3 = new DataColumn("Category", 2, DataType.STRING);
        DataColumn col4 = new DataColumn("Price", 3, DataType.DOUBLE);
        DataColumn col5 = new DataColumn("Image", 4, DataType.STRING);
        DataColumn col6 = new DataColumn("City", 5, DataType.STRING);
        DataColumn col7 = new DataColumn("State", 6, DataType.STRING);
        DataColumn col8 = new DataColumn("Zip", 7, DataType.STRING);
        queryA.getColumns().add(col1);
        queryA.getColumns().add(col2);
        queryA.getColumns().add(col3);
        queryA.getColumns().add(col4);
        queryA.getColumns().add(col5);
View Full Code Here

Examples of com.googlecode.g2re.domain.DataColumn

        /* Create a jdbc sql query and add to the report */
        JdbcQuery queryA = new JdbcQuery();
        queryA.setDataConnection(conn);
        queryA.setName("TotalQuery");
        queryA.setSqlQuery(totalQuery);
        DataColumn col1a = new DataColumn("Name", 0, DataType.STRING);
        DataColumn col2a = new DataColumn("Scores", 1, DataType.INTEGER);
        DataColumn col3a = new DataColumn("Votes", 2, DataType.INTEGER);
        queryA.getColumns().add(col1a);
        queryA.getColumns().add(col2a);
        queryA.getColumns().add(col3a);
        queryA.getParameters().add(new JdbcParameter(1, DataType.INTEGER, minParam));
        queryA.getParameters().add(new JdbcParameter(2, DataType.INTEGER, maxParam));
        report.getDataQueries().add(queryA);
       
        /* Create a jdbc sql query and add to the report */
        JdbcQuery queryB = new JdbcQuery();
        queryB.setDataConnection(conn);
        queryB.setName("ListQuery");
        queryB.setSqlQuery(petQuery);
        DataColumn col1b = new DataColumn("Name", 0, DataType.STRING);
        DataColumn col2b = new DataColumn("Description", 1, DataType.INTEGER);
        DataColumn col3b = new DataColumn("Price", 2, DataType.DOUBLE);
        DataColumn col4b = new DataColumn("Zip", 3, DataType.STRING);
        DataColumn col5b = new DataColumn("Votes", 4, DataType.INTEGER);
        queryB.getColumns().add(col1b);
        queryB.getColumns().add(col2b);
        queryB.getColumns().add(col3b);
        queryB.getColumns().add(col4b);
        queryB.getColumns().add(col5b);
View Full Code Here

Examples of dbfit.util.DataColumn

public class DiffTestUtils {

    public static List<DataColumn> createColumns(RowStructure rowStructure) {
        List<DataColumn> columns = new LinkedList<DataColumn>();
        for (String s: rowStructure.getColumnNames()) {
            columns.add(new DataColumn(s, s.getClass().getName(), ""));
        }
        return columns;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

    protected DataTable createTableFromDataSet() {
        DataTable gTable = DataTable.create();
        gTable.addRows(dataSet.getRowCount());
        List<DataColumn> columns = dataSet.getColumns();
        for (int i = 0; i < columns.size(); i++) {
            DataColumn dataColumn = columns.get(i);
            List columnValues = dataColumn.getValues();
            ColumnType columnType = dataColumn.getColumnType();
            gTable.addColumn(getColumnType(dataColumn), dataColumn.getId(), dataColumn.getId());
            for (int j = 0; j < columnValues.size(); j++) {
                Object value = columnValues.get(j);
                setTableValue(gTable, columnType, value, j, i);
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

        int columnIndex = 0;

        List<DisplayerSettingsColumn> displayerSettingsColumns = displayerSettings.getColumnList();
        for (int i = 0; i < displayerSettingsColumns.size(); i++) {
            DisplayerSettingsColumn displayerSettingsColumn = displayerSettingsColumns.get(i);
            DataColumn dataColumn = null;
            if (displayerSettingsColumn.getColumnId() != null) dataColumn = dataSet.getColumnById(displayerSettingsColumn.getColumnId());
            else dataColumn = dataSet.getColumnByIndex(columnIndex++);
            if (dataColumn == null) {
                throw new RuntimeException("Displayer column not found in the data set: " + displayerSettingsColumn.getDisplayName());
            }

            ColumnType columnType = dataColumn.getColumnType();
            List columnValues = dataColumn.getValues();
            gTable.addColumn(getColumnType(dataColumn), displayerSettingsColumn.getDisplayName(), dataColumn.getId());
            for (int j = 0; j < columnValues.size(); j++) {
                Object value = columnValues.get(j);
                setTableValue(gTable, columnType, value, j, i);
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

    }

    public static List<DataColumn> createDataColumns(JsArray<JsDataColumn> array) {
        List<DataColumn> results = new ArrayList<DataColumn>();
        for (int i = 0; i < array.length(); i++) {
            DataColumn dataColumn = createDataColumn(array.get(i));
            results.add(dataColumn);
        }
        return results;
    }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

        return ufPagedTable;
    }

    private void createTableColumnsFromDataSet( PagedTable<Integer> table, List<DataColumn> dataColumns ) {
        for ( int i = 0; i < dataColumns.size(); i++ ) {
            DataColumn dataColumn = dataColumns.get( i );
            String columnId = dataColumn.getId();

            Column<Integer, ?> column = createColumn( dataColumn.getColumnType(), columnId, i );
            if ( column != null ) {
                column.setSortable( true );
                table.addColumn( column, columnId );
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

    private void createTableColumnsFromDisplayerSettings( PagedTable<Integer> table, List<DisplayerSettingsColumn> displayerSettingsColumns ) {
        int columnIndex = 0;
        for ( int i = 0; i < displayerSettingsColumns.size(); i++ ) {
            DisplayerSettingsColumn displayerSettingsColumn = displayerSettingsColumns.get( i );
            DataColumn dataColumn;
            if (displayerSettingsColumn.getColumnId() != null) dataColumn = dataSet.getColumnById( displayerSettingsColumn.getColumnId() );
            else dataColumn = dataSet.getColumnByIndex( columnIndex++ );

            if (dataColumn == null) {
                String msg = "Displayer column not found in the data set: " + displayerSettingsColumn.getDisplayName();
                GWT.log( msg );
                throw new RuntimeException( msg );
            }

            String columnId = dataColumn.getId();
            String displayName = displayerSettingsColumn.getDisplayName();
            String caption = null;
            if ( displayName != null && !"".equals( displayName ) ) {
                caption = displayName;
                columnCaptionIds.put( displayName, columnId );
            } else {
                caption = columnId;
            }

            int colIndex = dataSet.getColumnIndex( dataColumn );
            Column<Integer, ?> column = createColumn( dataColumn.getColumnType(), columnId, colIndex );
            if ( column != null ) {
                column.setSortable( true );
                table.addColumn( column, caption );
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

        return pagedTable;
    }

    private void createTableColumnsFromDataSet( PagedTable<Integer> table, List<DataColumn> dataColumns ) {
        for ( int i = 0; i < dataColumns.size(); i++ ) {
            DataColumn dataColumn = dataColumns.get( i );
            String columnId = dataColumn.getId();

            Column<Integer, ?> column = createColumn( dataColumn.getColumnType(), columnId, i );
            if ( column != null ) {
                column.setSortable( true );
                table.addColumn( column, columnId );
            }
        }
View Full Code Here

Examples of org.dashbuilder.dataset.DataColumn

    private void createTableColumnsFromDisplayerSettings( PagedTable<Integer> table, List<DisplayerSettingsColumn> displayerSettingsColumns ) {
        int columnIndex = 0;
        for ( int i = 0; i < displayerSettingsColumns.size(); i++ ) {
            DisplayerSettingsColumn displayerSettingsColumn = displayerSettingsColumns.get( i );
            DataColumn dataColumn;
            if (displayerSettingsColumn.getColumnId() != null) dataColumn = dataSet.getColumnById( displayerSettingsColumn.getColumnId() );
            else dataColumn = dataSet.getColumnByIndex( columnIndex++ );

            if (dataColumn == null) {
                String msg = "Displayer column not found in the data set: " + displayerSettingsColumn.getDisplayName();
                GWT.log( msg );
                throw new RuntimeException( msg );
            }

            String columnId = dataColumn.getId();
            String displayName = displayerSettingsColumn.getDisplayName();
            String caption = null;
            if ( displayName != null && !"".equals( displayName ) ) {
                caption = displayName;
                columnCaptionIds.put( displayName, columnId );
            } else {
                caption = columnId;
            }

            int colIndex = dataSet.getColumnIndex( dataColumn );
            Column<Integer, ?> column = createColumn( dataColumn.getColumnType(), columnId, colIndex );
            if ( column != null ) {
                column.setSortable( true );
                table.addColumn( column, caption );
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.