Examples of Column


Examples of org.openfaces.component.table.Column

    public List<BaseColumn> getRenderedColumns() {
        FacesContext context = FacesContext.getCurrentInstance();
        List<BaseColumn> columns = TableUtil.getColumnsFromList(context, fileAttachments.getChildren());
        for (Iterator iterator = columns.iterator(); iterator.hasNext(); ) {
            Column column = (Column) iterator.next();
            if (!column.isRendered())
                iterator.remove();
        }
        if (childComponents.size() > 0 || columns.size() == 0)
            columns.add(new Column());

        return columns;
    }
View Full Code Here

Examples of org.optaplanner.examples.nqueens.domain.Column

    private List<Column> createColumnList(NQueens nQueens) {
        int n = nQueens.getN();
        List<Column> columnList = new ArrayList<Column>(n);
        for (int i = 0; i < n; i++) {
            Column column = new Column();
            column.setId((long) i);
            column.setIndex(i);
            columnList.add(column);
        }
        return columnList;
    }
View Full Code Here

Examples of org.primefaces.component.column.Column

   
    writer.write("var " + columnDefVar + " = [");
       
    for(UIComponent kid : dataTable.getChildren()) {
      if(kid.isRendered() && kid instanceof Column) {
        Column column = (Column) kid;
       
        if(firstWritten)
          writer.write(",");
        else
          firstWritten=true;
       
        writer.write("{key:'" + column.getClientId(facesContext+ "'");
       
        //header
        UIComponent header = column.getFacet("header");
        writer.write(",label:'");
        if(header != null) {
          if(ComponentUtils.isLiteralText(header)) {
            String literalText = header.toString().trim();
            ValueExpression ve = facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), literalText, Object.class);
            Object value = ve.getValue(facesContext.getELContext());
            if(value != null) {
              writer.write(value.toString());
            }
          } else {           
            renderChild(facesContext, column.getFacet("header"));
          }
         
          if(column.getValueExpression("filterBy") != null) {
            encodeColumnFilter(facesContext, column, datatableVar);
          }
        }
        writer.write("'");
       
        if(column.isResizable()) writer.write(",resizeable:true");
        if(column.getWidth() != Integer.MIN_VALUE) writer.write(",width:" + column.getWidth());
        if(column.getStyleClass() != null) writer.write(",className:'" + column.getStyleClass() + "'");
       
        //sorting
        if(column.getValueExpression("sortBy") != null) {
          writer.write(",sortable:true");
         
          if(!dataTable.isDynamic()) {
            writer.write(",sortOptions:{field:'" + column.getClientId(facesContext) + "'");
            if(column.getSortFunction() != null) {
              writer.write(",sortFunction:" + column.getSortFunction().getExpressionString());
            }
            writer.write("}");
           
            if(column.getParser() != null) writer.write(",parser:'" + column.getParser() + "'");
          }
        }
       
        writer.write("}");
      }
View Full Code Here

Examples of org.qdao.annotation.Column

    List<TableDescriptor.ColumnDescription> columnDescriptors =
        new ArrayList<TableDescriptor.ColumnDescription>();

    List<String> primaryKeys = new ArrayList<String>();
    List<TableDescriptor.ColumnDescription> pks = new ArrayList<TableDescriptor.ColumnDescription>();
    Column co;
    PrimaryKey pk;
    TableDescriptor.ColumnDescription cd;
/*    TableDescriptor.FkDescription fkd;
    String fkTableName;
    ForeignKey fk;
*/    for (int i = 0; i < fields.length; i++) {
      co = fields[i].getAnnotation(Column.class);
      pk = fields[i].getAnnotation(PrimaryKey.class);
//      fk = fields[i].getAnnotation(ForeignKey.class);
      if (co != null) {
        cd = new TableDescriptor.ColumnDescription();
        cd.decimal = co.decimal();
        cd.description = co.description();
        cd.name = co.name();
        cd.length = co.length();
        cd.nullable = co.nullable();
        cd.type = co.type();
        cd.javaField = fields[i].getName();
        cd.primaryKey = null != pk;
        cd.autoIncrement = co.autoIncrement();
        cd.defaultValue = co.defaultValue();
        columnDescriptors.add(cd);
       
        if (cd.primaryKey) {
          pks.add(cd);
        }
       
        /*if (fk != null) {
          table = fk.getClass().getAnnotation(Table.class);
          fkTableName = null == table ? null : table.name();
          if (null != fkTableName) {
            fkd = new TableDescriptor.FkDescription();
            fkd.foreignKeys = "("  + co.name();
            fkd.references = fkTableName + " (";
          }
        }*/
      }

      if (pk != null) {
        primaryKeys.add(co.name());
      }
    }
    // set the columns
    tableDescriptor.columns = columnDescriptors.toArray(
        new TableDescriptor.ColumnDescription[columnDescriptors.size()]);
View Full Code Here

Examples of org.richfaces.component.Column

                    if (currentLength > count) {
                        count = currentLength;
                    }
                    currentLength = 0;
                } else if (column instanceof Column) {
                    Column tableColumn = (Column) column;
                    // For new row, save length of previsous.
                    if (tableColumn.isBreakBefore()) {
                        if (currentLength > count) {
                            count = currentLength;
                        }
                        currentLength = 0;
                    }
View Full Code Here

Examples of org.springframework.roo.addon.dbre.model.Column

    }

    private AnnotationMetadataBuilder getJoinColumnAnnotation(
            final Reference reference, final boolean referencedColumn,
            final JavaType fieldType, final Boolean nullable) {
        final Column localColumn = reference.getLocalColumn();
        Validate.notNull(localColumn, "Foreign-key reference local column '"
                + reference.getLocalColumnName() + "' must not be null");
        final AnnotationMetadataBuilder joinColumnBuilder = new AnnotationMetadataBuilder(
                JOIN_COLUMN);
        joinColumnBuilder
                .addStringAttribute(NAME, localColumn.getEscapedName());

        if (referencedColumn) {
            final Column foreignColumn = reference.getForeignColumn();
            Validate.notNull(
                    foreignColumn,
                    "Foreign-key reference foreign column '%s' must not be null",
                    reference.getForeignColumnName());
            joinColumnBuilder.addStringAttribute("referencedColumnName",
                    foreignColumn.getEscapedName());
        }

        if (nullable == null) {
            if (localColumn.isRequired()) {
                joinColumnBuilder.addBooleanAttribute("nullable", false);
View Full Code Here

Examples of org.teiid.metadata.Column

    addColumn("prorettype", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$

    // Number of input arguments
    addColumn("pronargs", DataTypeManager.DefaultDataTypes.SHORT, t); //$NON-NLS-1$
   
    Column c = addColumn("proargtypes", DataTypeManager.DefaultDataTypes.OBJECT, t); //$NON-NLS-1$
    c.setProperty("pg_type:oid", String.valueOf(PG_TYPE_OIDVECTOR)); //$NON-NLS-1$
   
    c = addColumn("proargnames", DataTypeManager.DefaultDataTypes.OBJECT, t); //$NON-NLS-1$
    c.setProperty("pg_type:oid", String.valueOf(PG_TYPE_TEXTARRAY)); //$NON-NLS-1$
   
    c = addColumn("proargmodes", DataTypeManager.DefaultDataTypes.OBJECT, t); //$NON-NLS-1$
    c.setProperty("pg_type:oid", String.valueOf(PG_TYPE_CHARARRAY)); //$NON-NLS-1$
   
    c = addColumn("proallargtypes", DataTypeManager.DefaultDataTypes.OBJECT, t); //$NON-NLS-1$
    c.setProperty("pg_type:oid", String.valueOf(PG_TYPE_OIDARRAY)); //$NON-NLS-1$
   
    // The OID of the namespace that contains this function
    addColumn("pronamespace", DataTypeManager.DefaultDataTypes.INTEGER, t); //$NON-NLS-1$
   
    addPrimaryKey("pk_pg_proc", Arrays.asList("oid"), t); //$NON-NLS-1$ //$NON-NLS-2$
View Full Code Here

Examples of org.uguess.birt.report.engine.spreadsheet.model.Column

  public Column getColumn( Column col, double width )
  {
    width = ( width < 0 ) ? ModelConstants.DEFAULT_COLUMNWIDTH : width;

    Column newCol = ColumnImpl.create( col );
    newCol.setWidth( Math.abs( width ) );
    return getColumn( newCol );
  }
View Full Code Here

Examples of org.voltdb.catalog.Column

        Table t = getTable(tableName);
        VoltTable.ColumnInfo[] vtCols = new VoltTable.ColumnInfo[t.getColumns().size()];
        Iterator<Column> iCols = t.getColumns().iterator();
        while (iCols.hasNext())
        {
            Column c = iCols.next();
            vtCols[c.getIndex()] = new VoltTable.ColumnInfo(c.getName(), VoltType.get((byte) c.getType()));
        }

        return new VoltTable(vtCols);
    }
View Full Code Here

Examples of org.xorm.datastore.Column

        whereClause.append(")");
    }

    /** Parses the non-compound Condition. */
    private boolean parseSimple(Alias alias, SimpleCondition condition) {
        Column column = condition.getColumn();
        Object operand = condition.getValue();
        boolean wasOuter = false;
        StringBuffer buffer = whereClause;
        if (operand instanceof Selector) {
            Selector next = (Selector) operand;
            Alias nextAlias = makeAlias(next);
            if (next.isOuterJoin()) {
                if (next.getCondition() instanceof SimpleCondition) {
                    parseSimple(nextAlias, (SimpleCondition) next.getCondition());
                } else {
                    wasOuter = true;
                }
                fromClause.append(" LEFT OUTER JOIN ")
                    .append(nextAlias.getTable().getName())
                    .append(" ")
                    .append(nextAlias.getName())
                    .append(" ON ");
                buffer = fromClause;
            } else {
                buffer.append("(");
            }
            buffer.append(alias.getName())
                .append(".")
                .append(column.getName())
                .append(" = ");

            // In the usual case this should be nextAlias.primaryKey,
            // but in the case of CONTAINS it should be nextAlias.foreignKey.
            buffer.append(nextAlias.getName())
                .append(".")
                .append(nextAlias.getJoinColumn().getName());

            // Because Many-to-Many operations can cause multiple
            // copies, set the distinct flag.
            if (condition.getOperator() == Operator.CONTAINS) {
                distinct = true;
            }

            if (!next.isOuterJoin()) {
                parse(nextAlias, next);
                buffer.append(")");
            }
        } else {
            whereClause.append("(");
            whereClause.append(alias.getName())
                .append(".")
                .append(column.getName());
            parseOperand(condition.getOperator(), operand);
            whereClause.append(")");
        }
        return wasOuter;
    }
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.