Examples of Column


Examples of com.arconsis.android.datarobot.builder.schema.data.Column

        if (column.getAnnotation(PrimaryKey.class) != null && ++primaryKeyCount > 1) {
          messager.printMessage(Kind.ERROR, "Only one @PrimaryKey is allowed within an @Entity", entity);
          return null;
        }
        ColumnReader columnReader = new ColumnReader(column, messager);
        Column read = columnReader.read();
        if (read != null) {
          table.addColumn(read);
        }
      }

      VariableElement association = child.accept(new AssociationElementResolvingTypeVisitor(), null);
      if (association != null) {
        AssociationReader associationReader = new AssociationReader(association, entityNames, messager);
        Association read = associationReader.read();
        if (read != null) {
          table.addAssociation(read);

          if (AssociationType.TO_MANY == read.getCardinality()) {
            if (countedToManyAssociations.containsKey(read.getCanonicalTypeInEntity())) {
              countedToManyAssociations.get(read.getCanonicalTypeInEntity()).incrementAndGet();
            } else {
              countedToManyAssociations.put(read.getCanonicalTypeInEntity(), new AtomicInteger(1));
            }
          }
        }
      }
    }
View Full Code Here

Examples of com.avaje.ebean.RawSql.ColumnMapping.Column

    public void test_simple() {
       
        ColumnMapping columnMapping = DRawSqlColumnsParser.parse("a,b,c");
        Map<String, Column> mapping = columnMapping.mapping();
        Column c = mapping.get("a");
       
        assertEquals("a",c.getDbColumn());
        assertEquals(0, c.getIndexPos());
        assertEquals("a",c.getPropertyName());

        c = mapping.get("b");
        assertEquals("b",c.getDbColumn());
        assertEquals(1, c.getIndexPos());
        assertEquals("b",c.getPropertyName());

        c = mapping.get("c");
        assertEquals("c",c.getDbColumn());
        assertEquals(2, c.getIndexPos());
        assertEquals("c",c.getPropertyName());

    }
View Full Code Here

Examples of com.baulsupp.kolja.log.viewer.columns.Column

  }

  public void prependColumn(String name, int width, OutputFormat of) {
    this.columns.add(0, name);
    this.formats.add(0, of);
    this.widths.addColumn(0, new Column(width));
  }
View Full Code Here

Examples of com.brsanthu.dataexporter.model.Column

        for (int j = 0; j < maxRowHeight; j++) {
            rowLines.add(new ArrayList<String>());
        }

        for (int columnIndex = 0; columnIndex < columns.size(); columnIndex++) {
            Column column = columns.get(columnIndex);
           
            CellDetails cellDetails = new CellDetails(rowDetails, columnIndex);
            cellDetails.setRowHeight(maxRowHeight);
            cellDetails.setCellValue(rowDetails.getRow().getCellValue(cellDetails));
            cellDetails.setCellAlign(cellDetails.getColumn().getAlign());
           
            if (callback != null) {
                callback.beforeCell(cellDetails);
            }

            List<String> cells = column.align(cellDetails, column.format(cellDetails));
            for (int j = 0; j < maxRowHeight; j++) {
                rowLines.get(j).add(cells.get(j));
            }

            if (callback != null) {
View Full Code Here

Examples of com.caucho.db.table.Column

  /**
   * The cost of a match of the expr.
   */
  protected long lookupCost(ArrayList<FromItem> fromList)
  {
    Column column = findColumn(fromList);
    if (column == null)
      return Integer.MAX_VALUE;
   
    FromItem fromItem = fromList.get(fromList.size() - 1);

    Table table = fromItem.getTable();

    column = table.getColumn(_column);

    if (column == null)
      return 100 * 100 * 100;
    else if (column.isPrimaryKey())
      return 100;
    else if (column.isUnique())
      return 100 * 100;
    else
      return 100 * 100 * 100;
  }
View Full Code Here

Examples of com.cedarsoftware.ncube.Column

            Set<Long> coord = new LinkedHashSet<Long>();

            for (int i = 0; i < width; i++)
            {
                s.append("<tr>\n");
                Column column = topColumns.get(i);
                s.append(" <th data-id=\"c").append(column.getId()).append("\" class=\"ncube-col\">");
                s.append(column.isDefault() ? "Default" : column.toString());
                coord.clear();
                coord.add(topColumns.get(i).getId());
                s.append("</th>\n");
                buildCell(ncube, s, coord);
                s.append("</tr>\n");
            }
        }
        else
        {   // 2D+ shows as one column on the X axis and all other dimensions on the Y axis.
            int deadCols = axes.size() - 1;
            if (deadCols > 0)
            {
                s.append(" <th class=\"ncube-dead\" colspan=\"").append(deadCols).append("\">");
                s.append(ncube.getName());
                s.append("</th>\n");
            }
            s.append(" <th data-id=\"a").append(topAxis.getId()).append("\" class=\"ncube-head\" colspan=\"");
            s.append(topAxis.size());
            s.append("\">");
            s.append("  <div class=\"btn-group axis-menu\" data-id=\"").append(topAxisName).append("\">\n");
            s.append("  <button type=\"button\" class=\"btn-sm btn-primary dropdown-toggle axis-btn\" data-toggle=\"dropdown\">");
            s.append("   <span>").append(topAxisName).append("</span><span class=\"caret\"></span>");
            s.append("  </button>\n");
            s.append("   </div>\n");
            s.append(" </th>\n</tr>\n");

            // Second row (special case)
            s.append("<tr>\n");
            Map<String, Long> rowspanCounter = new HashMap<String, Long>();
            Map<String, Long> rowspan = new HashMap<String, Long>();
            Map<String, Long> columnCounter = new HashMap<String, Long>();
            Map<String, List<Column>> columns = new HashMap<String, List<Column>>();
            Map<String, Long> coord = new HashMap<String, Long>();

            final int axisCount = axes.size();

            for (int i = 1; i < axisCount; i++)
            {
                Axis axis = axes.get(i);
                String axisName = axis.getName();
                s.append(" <th data-id=\"a").append(axis.getId()).append("\" class=\"ncube-head\">\n");
                s.append("  <div class=\"btn-group axis-menu\" data-id=\"").append(axisName).append("\">\n");
                s.append("   <button type=\"button\" class=\"btn-sm btn-primary dropdown-toggle axis-btn\" data-toggle=\"dropdown\">");
                s.append("    <span>").append(axisName).append("</span><span class=\"caret\"></span>");
                s.append("   </button>\n");
                s.append("   </div>\n");
                s.append(" </th>\n");
                long colspan = 1;

                for (int j = i + 1; j < axisCount; j++)
                {
                    colspan *= axes.get(j).size();
                }

                rowspan.put(axisName, colspan);
                rowspanCounter.put(axisName, 0L);
                columnCounter.put(axisName, 0L);
                columns.put(axisName, axis.getColumns());
            }

            for (Column column : topColumns)
            {
                s.append(" <th data-id=\"c").append(column.getId()).append("\" class=\"ncube-col\">");
                s.append(column.toString());
                s.append("</th>\n");
            }

            if (topAxis.size() != topColumnSize)
            {
                s.append(" <th class=\"ncube-col\">Default</th>");
            }

            s.append("</tr>\n");

            // The left column headers and cells
            for (long h = 0; h < height; h++)
            {
                s.append("<tr>\n");
                // Column headers for the row
                for (int i = 1; i < axisCount; i++)
                {
                    Axis axis = axes.get(i);
                    String axisName = axis.getName();
                    Long count = rowspanCounter.get(axisName);

                    if (count == 0)
                    {
                        Long colIdx = columnCounter.get(axisName);
                        Column column = columns.get(axisName).get(colIdx.intValue());
                        coord.put(axisName, column.getId());
                        long span = rowspan.get(axisName);

                        if (span == 1)
                        {   // drop rowspan tag since rowspan="1" is redundant and wastes space in HTML
                            // Use column's ID as TH element's ID
                            s.append(" <th data-id=\"c").append(column.getId()).append("\" class=\"ncube-col\">");
                        }
                        else
                        {   // Need to show rowspan attribute
                            // Use column's ID as TH element's ID
                            s.append(" <th data-id=\"c").append(column.getId()).append("\" class=\"ncube-col\" rowspan=\"");
                            s.append(span);
                            s.append("\">");
                        }
                        s.append(column.toString());
                        s.append("</th>\n");

                        // Increment column counter
                        colIdx++;
                        if (colIdx >= axis.size())
View Full Code Here

Examples of com.customized.tools.ui.swt.Column

  }

  protected void fillTableContent(Table table) {
   
    List<Column> columns = new ArrayList<Column>();
      columns.add(new Column("Key", 100));
      columns.add(new Column("Value", 200));
      columns.add(new Column("Lifespan", 100));
      columns.add(new Column("MaxIdle", 100));
      columns.add(new Column("Alias", 100));
      fillTableColumns(columns, table);
     
      updateTableItems();
  }
View Full Code Here

Examples of com.ebay.erl.mobius.core.model.Column

  {
    Column[] result = new Column[columns.length];
   
    for( int i=0;i<columns.length;i++ )
    {
      result[i] = new Column(ds, columns[i]);
    }
    return result;
  }
View Full Code Here

Examples of com.ebay.xcelite.annotations.Column

  @SuppressWarnings("unchecked")
  public void extract() {   
    Set<Field> columnFields = ReflectionUtils.getAllFields(type, withAnnotation(Column.class));
    for (Field columnField : columnFields) {
      Column annotation = columnField.getAnnotation(Column.class);
      Col col = null;
      if (annotation.name().isEmpty()) {
        col = new Col(columnField.getName(), columnField.getName());       
      } else {
        col = new Col(annotation.name(), columnField.getName());       
      }     
     
      if (annotation.ignoreType()) {
        col.setType(String.class);
      } else {
        col.setType(columnField.getType());
      }
      if (!annotation.dataFormat().isEmpty()) {
        col.setDataFormat(annotation.dataFormat());
      }
      if (annotation.converter() != NoConverterClass.class) {
        col.setConverter(annotation.converter());
      }
      columns.add(col);
    }  
   
    if (colsOrdering != null) {
View Full Code Here

Examples of com.et.ar.annotations.Column

            if (id != null){
                orm.id = f.getName();
                orm.idGeneratorType = id.generate();
                orm.idType = f.getType();
            }
            Column column = f.getAnnotation(Column.class);
            if (column != null){
                ColumnField field = new ColumnField();
                field.setName(f.getName());
                field.setType(f.getType());
                columnFields.add(field);
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.