Examples of addColumn()


Examples of org.apache.openjpa.jdbc.schema.PrimaryKey.addColumn()

        // add primary key columns to table pk if logical
        field.mapPrimaryKey(adapt);
        PrimaryKey pk = field.getTable().getPrimaryKey();
        if (field.isPrimaryKey() && pk != null && (adapt || pk.isLogical()))
            for (int i = 0; i < _cols.length; i++)
                pk.addColumn(_cols[i]);

        // set joinable
        if (!field.getHandler().objectValueRequiresLoad(field))
            for (int i = 0; i < _cols.length; i++)
                field.getDefiningMapping().setJoinable(_cols[i], this);
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Table.addColumn()

        _pkColumn = addPrimaryKeyColumn(table);
        PrimaryKey pk = table.addPrimaryKey();
        pk.addColumn(_pkColumn);

        DBDictionary dict = _conf.getDBDictionaryInstance();
        _seqColumn = table.addColumn(dict.getValidColumnName
            (_seqColumnName, table));
        _seqColumn.setType(dict.getPreferredType(Types.BIGINT));
        _seqColumn.setJavaType(JavaTypes.LONG);
    }
View Full Code Here

Examples of org.apache.openjpa.jdbc.schema.Unique.addColumn()

        Object current = currentElement();
        if (current instanceof Unique) {
            Unique unique = (Unique) current;
            Column column = new Column();
            column.setName(this.currentText());
            unique.addColumn(column);
            return true;
        }
        return false;
    }
   
View Full Code Here

Examples of org.apache.phoenix.hbase.index.covered.CoveredColumns.addColumn()

    ColumnReference ref = new ColumnReference(fam, qual);
    CoveredColumns columns = new CoveredColumns();
    assertEquals("Should have only found a single column to cover", 1, columns
        .findNonCoveredColumns(Arrays.asList(ref)).size());

    columns.addColumn(ref);
    assertEquals("Shouldn't have any columns to cover", 0,
      columns.findNonCoveredColumns(Arrays.asList(ref)).size());
  }
}
View Full Code Here

Examples of org.apache.phoenix.schema.MetaDataClient.addColumn()

                }

                @Override
                public MutationState execute() throws SQLException {
                    MetaDataClient client = new MetaDataClient(getConnection());
                    return client.addColumn(ExecutableAddColumnStatement.this);
                }
            };
        }
    }
View Full Code Here

Examples of org.apache.sqoop.schema.Schema.addColumn()

      .setNote(note)
      .setCreationDate(date);

    JSONArray columnsArray = (JSONArray)jsonObject.get(COLUMNS);
    for (Object obj : columnsArray) {
      schema.addColumn(restoreColumn((JSONObject)obj));
    }

    return schema;
  }
View Full Code Here

Examples of org.apache.storm.hbase.bolt.mapper.HBaseProjectionCriteria.addColumn()

        WordSpout spout = new WordSpout();
        TotalWordCounter totalBolt = new TotalWordCounter();

        SimpleHBaseMapper mapper = new SimpleHBaseMapper().withRowKeyField("word");
        HBaseProjectionCriteria projectionCriteria = new HBaseProjectionCriteria();
        projectionCriteria.addColumn(new HBaseProjectionCriteria.ColumnMetaData("cf", "count"));

        WordCountValueMapper rowToTupleMapper = new WordCountValueMapper();

        HBaseLookupBolt hBaseLookupBolt = new HBaseLookupBolt("WordCount", mapper, rowToTupleMapper)
                .withConfigKey("hbase.conf")
View Full Code Here

Examples of org.apache.storm.hbase.common.ColumnList.addColumn()

    public ColumnList columns(TridentTuple tuple) {
        ColumnList cols = new ColumnList();
        if(this.columnFields != null){
            // TODO timestamps
            for(String field : this.columnFields){
                cols.addColumn(this.columnFamily, field.getBytes(), toBytes(tuple.getValueByField(field)));
            }
        }
        if(this.counterFields != null){
            for(String field : this.counterFields){
                cols.addCounter(this.columnFamily, field.getBytes(), toLong(tuple.getValueByField(field)));
View Full Code Here

Examples of org.apache.tajo.catalog.Schema.addColumn()

  }

  public static Schema sortSpecsToSchema(SortSpec[] sortSpecs) {
    Schema schema = new Schema();
    for (SortSpec spec : sortSpecs) {
      schema.addColumn(spec.getSortKey());
    }

    return schema;
  }
View Full Code Here

Examples of org.apache.torque.map.TableMap.addColumn()

        // Add User columns.
        tMap = dbMap.getTable(getTableUser());
        tMap.setPrimaryKeyMethod(TableMap.ID_BROKER);
        tMap.setPrimaryKeyMethodInfo(tMap.getName());
        tMap.addPrimaryKey(getUserId(), integer);
        tMap.addColumn(getUsername(), string);
        tMap.addColumn(getPassword(), string);
        tMap.addColumn(getFirstName(), string);
        tMap.addColumn(getLastName(), string);
        tMap.addColumn(getEmail(), string);
        tMap.addColumn(getConfirmValue(), string);
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.