Examples of ColumnInfo


Examples of com.scooterframework.orm.sqldataexpress.object.ColumnInfo

        StringBuilder names = new StringBuilder();
        StringBuilder values = new StringBuilder();
        int maxSize = rd.getSize();
        int positionIndex = 0;
        ColumnInfo ci = null;
        int i = 0;
    for (i = 0; i < maxSize - 1; i++) {
            ci = ri.getColumnInfo(i);
            if (ci.isPrimaryKey() && autoPopulatePrimaryKey) continue;
            if (ci.isReadOnly() || !ci.isWritable()) continue;
            if (changedOnly && !modifiedColumns.contains(ci.getColumnName())) continue;

            names.append(ci.getColumnName()).append(", ");
            values.append("?, ");
            positionIndex = positionIndex + 1;
            outs.put(positionIndex+"", rd.getField(i));
        }

        //the last column: i=maxSize-1
        ci = ri.getColumnInfo(i);
    if (!ci.isReadOnly()
        && ci.isWritable()
        && (!changedOnly || changedOnly
            && modifiedColumns.contains(ci.getColumnName()))) {
            names.append(ci.getColumnName()).append("");
            values.append("?");
            positionIndex = positionIndex + 1;
            outs.put(positionIndex+"", rd.getField(i));
        }
View Full Code Here

Examples of com.taobao.tddl.dbsync.binlog.event.TableMapLogEvent.ColumnInfo

                                              + columnInfo.length + " vs " + tableMeta.getFileds().size());
            }
        }

        for (int i = 0; i < columnCnt; i++) {
            ColumnInfo info = columnInfo[i];
            buffer.nextValue(info.type, info.meta);

            FieldMeta fieldMeta = null;
            Column.Builder columnBuilder = Column.newBuilder();
            columnBuilder.setIndex(i);
View Full Code Here

Examples of net.mlw.vlh.web.tag.support.ColumnInfo

      {

         String titleKey = getTitleKey();
         String label = (titleKey == null) ? getTitle() : config.getMessageSource().getMessage(titleKey, null, titleKey, locale);

         ColumnInfo columnInfo = new ColumnInfo(config.getDisplayHelper().help(pageContext, label), getAdapterProperty(), defaultSort,
               getAttributes());

         // Process toolTip if any
         // toolTip or toolTipKey is set => get the string and put it into the ColumnInfo
         String toolTipKey = getToolTipKey();
         columnInfo.setToolTip((toolTipKey == null) ? getToolTip() : config.getMessageSource().getMessage(toolTipKey, null, toolTipKey,
               locale));

         columnInfo.setNestedList(this.nestedColumnInfoList);

         rowTag.addColumnInfo(columnInfo);
      }

      DisplayProvider displayProvider = rowTag.getDisplayProvider();
View Full Code Here

Examples of org.apache.derby.impl.sql.execute.ColumnInfo

    for (int index = 0; index < rclSize; index++)
    {
      ResultColumn rc = (ResultColumn) rcl.elementAt(index);

      //RESOLVEAUTOINCREMENT
      colInfos[index] = new ColumnInfo(rc.getName(),
                       rc.getType(),
                       null,
                       null,
                       null,
                       null,
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.ColumnInfo

        continue;
      }
      // For the tab.* case, add all the columns to the fieldList
      // from the input schema
      for (Map.Entry<String, ColumnInfo> entry : fMap.entrySet()) {
        ColumnInfo colInfo = entry.getValue();
        String name = colInfo.getInternalName();
        String[] tmp = input.reverseLookup(name);

        // Skip the colinfos which are not for this particular alias
        if (tabAlias != null && !tmp[0].equalsIgnoreCase(tabAlias)) {
          continue;
        }

        if (colInfo.getIsVirtualCol() && colInfo.isHiddenVirtualCol()) {
          continue;
        }

        // Not matching the regex?
        if (!regex.matcher(tmp[1]).matches()) {
          continue;
        }

        ExprNodeColumnDesc expr = new ExprNodeColumnDesc(colInfo.getType(),
            name, colInfo.getTabAlias(), colInfo.getIsVirtualCol());
        col_list.add(expr);
        output.put(tmp[0], tmp[1],
            new ColumnInfo(getColumnInternalName(pos), colInfo.getType(),
            colInfo.getTabAlias(), colInfo.getIsVirtualCol(),
            colInfo.isHiddenVirtualCol()));
        pos = Integer.valueOf(pos.intValue() + 1);
        matched++;

        if (unparseTranslator.isEnabled()) {
          if (replacementText.length() > 0) {
View Full Code Here

Examples of org.apache.jena.jdbc.results.metadata.columns.ColumnInfo

            throw new SQLException("Result set is closed");
        if (this.currRow < 0 || this.currRow >= this.rows.length)
            throw new SQLException("Not currently at a row");
        if (columnIndex >= 1 && columnIndex <= this.columns.length) {
            // Remember that JDBC uses a 1 based index
            ColumnInfo info = this.columns[columnIndex - 1];

            // Determine whether the column has a null value
            Object obj = this.rows[this.currRow][columnIndex - 1];
            this.wasNull = (obj == null);
            if (this.wasNull)
                return nullValue;

            if (info.getType() == expectedType) {
                // If the column is typed appropriately try and marshal
                // appropriately
                if (targetType.isAssignableFrom(obj.getClass())) {
                    try {
                        Object temp = targetType.cast(obj);
                        return temp;
                    } catch (ClassCastException e) {
                        throw new SQLException("Value for this column (Row " + (currRow+1) + " Column " + columnIndex + ") is not valid for the columns declared type", e);
                    }
                } else {
                    throw new SQLException("Value for this column (Row " + (currRow+1) + " Column " + columnIndex + ") is not valid for the columns declared type");
                }
            } else {
                throw new SQLException("Given column (Row " + (currRow+1) + " Column " + columnIndex + ") does not contain appropriately typed values.  Column type declared as " + info.getType() + " but expected type for this lookup is " + expectedType);
            }
        } else {
            throw new SQLException("Column index is out of bounds");
        }
    }
View Full Code Here

Examples of org.apache.log.output.db.ColumnInfo

        {
            final String name = conf[ i ].getValue();
            final int type = ColumnType.getTypeIdFor( conf[ i ].getName() );
            final String aux = conf[ i ].getAttribute( "aux", null );

            columns[ i ] = new ColumnInfo( name, type, aux );
        }

        final DataSource dataSource;

        try
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.ColumnInfo

            int first = htmlDataTable.getFirst();
            int rowInfoIndex = htmlDataTable.getRowIndex() - first;
            int columnInfoIndex = tableChildren.indexOf(component);

            RowInfo rowInfo = (RowInfo) htmlDataTable.getTableContext().getRowInfos().get(rowInfoIndex);
            ColumnInfo columnInfo = (ColumnInfo) rowInfo.getColumnInfos().get(columnInfoIndex);

            if (!columnInfo.isRendered()) {
                return;
            }

            if (component instanceof HtmlColumn && amISpannedOver(null, component)) {
                return;
            }
            writer.startElement(HTML.TD_ELEM, uiData);
            String styleClass = null;
            if (component instanceof HtmlColumn) {
                styleClass = ((HtmlColumn) component).getStyleClass();
            }
            if (columnInfo.getStyleClass() != null) {
                styleClass = columnInfo.getStyleClass();
            }

            if (styles.hasColumnStyle()) {
                if (styleClass == null) {
                    styleClass = styles.getColumnStyle(columnStyleIndex);
                }
            }
            if (styleClass != null) {
                writer.writeAttribute(HTML.CLASS_ATTR, styleClass, null);
            }

            if (columnInfo.getStyle() != null) {
                writer.writeAttribute(HTML.STYLE_ATTR, columnInfo.getStyle(), null);
            }

            if (columnInfo.getRowSpan() > 1) {
                writer.writeAttribute("rowspan", new Integer(columnInfo.getRowSpan()).toString(), null);
                if (columnInfo.getStyle() == null) {
                    writer.writeAttribute(HTML.STYLE_ATTR, "vertical-align:top", null);
                }
            }

            renderHtmlColumnAttributes(writer, component, null);
View Full Code Here

Examples of org.apache.myfaces.renderkit.html.util.ColumnInfo

        int currentRowSpan = -1;
        int currentRowInfoIndex = -1;

        TableContext tableContext = htmlDataTable.getTableContext();
        RowInfo rowInfo = null;
        ColumnInfo columnInfo = null;
        HtmlSimpleColumn currentColumn = null;
        Map groupHashTable = new HashMap();

        if (rows <= 0) {
            last = htmlDataTable.getRowCount();
        }
        else {
            last = first + rows;
        }

        //Loop over the Children Columns to find the Columns with groupBy Attribute true
        List children = getChildren(htmlDataTable);
        int nChildren = getChildCount(htmlDataTable);

        for (int j = 0, size = nChildren; j < size; j++) {
            UIComponent child = (UIComponent) children.get(j);
            if (child instanceof HtmlSimpleColumn) {
                currentColumn = (HtmlSimpleColumn) child;
                if (currentColumn.isGroupBy()) {
                    groupHashTable.put(new Integer(j), null);
                }
            }
        }

        boolean groupEndReached = false;

        for (int rowIndex = first; last == -1 || rowIndex < last; rowIndex++) {
            htmlDataTable.setRowIndex(rowIndex);
            rowInfo = new RowInfo();
            //scrolled past the last row
            if (!htmlDataTable.isRowAvailable()) {
                break;
            }

            Set groupIndexList = groupHashTable.keySet();
            List currentColumnContent = null;
            for (Iterator it = groupIndexList.iterator(); it.hasNext();) {
                currentColumnContent = new ArrayList();
                Integer currentIndex = (Integer) it.next();
                currentColumn = (HtmlSimpleColumn) children.get(currentIndex.intValue());

                if (currentColumn.isGroupByValueSet()) {
                    currentColumnContent.add(currentColumn.getGroupByValue());
                }
                else {
                    // iterate the children - this avoids to add the column facet too
                    List currentColumnChildren = currentColumn.getChildren();
                    if (currentColumnChildren != null) {
                        collectChildrenValues(currentColumnContent, currentColumnChildren.iterator());
                    }
                }

                if (!isListEqual(currentColumnContent, (List) groupHashTable.get(currentIndex)) &&
                    currentRowInfoIndex > -1) {
                    groupEndReached = true;
                    groupHashTable.put(currentIndex, currentColumnContent);
                }
                else if (currentRowInfoIndex == -1) {
                    groupHashTable.put(currentIndex, currentColumnContent);
                }
            }
            currentRowSpan++;


            for (int j = 0, size = nChildren; j < size; j++) {
                columnInfo = new ColumnInfo();
                if (groupHashTable.containsKey(new Integer(j)))  // Column is groupBy
                {
                    if (currentRowSpan > 0) {
                        if (groupEndReached) {
                            ((ColumnInfo)
                                ((RowInfo)
                                    tableContext.getRowInfos().get(currentRowInfoIndex - currentRowSpan + 1)).
                                    getColumnInfos().get(j)).
                                setRowSpan(currentRowSpan);
                            columnInfo.setStyle(htmlDataTable.getRowGroupStyle());
                            columnInfo.setStyleClass(htmlDataTable.getRowGroupStyleClass());
                        }
                        else {
                            columnInfo.setRendered(false);
                        }
                    }
                    else {
                        columnInfo.setStyle(htmlDataTable.getRowGroupStyle());
                        columnInfo.setStyleClass(htmlDataTable.getRowGroupStyleClass());
                    }

                }
                else    // Column  is not group by
                {
View Full Code Here

Examples of org.apache.phoenix.util.ColumnInfo


    @Test
    public void testBuildColumnInfoList() {
        List<ColumnInfo> columnInfoList = ImmutableList.of(
                new ColumnInfo("idCol", PDataType.INTEGER.getSqlType()),
                new ColumnInfo("unsignedIntCol", PDataType.UNSIGNED_INT.getSqlType()),
                new ColumnInfo("stringArrayCol", PDataType.INTEGER_ARRAY.getSqlType()));

        Configuration conf = new Configuration();
        CsvToKeyValueMapper.configureColumnInfoList(conf, columnInfoList);
        List<ColumnInfo> fromConfig = CsvToKeyValueMapper.buildColumnInfoList(conf);
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.