int noOfColumns = ndbTable.getNoOfColumns();
ColumnImpl[] columnImpls = new ColumnImpl[noOfColumns];
columnNames = new String[noOfColumns];
for (int i = 0; i < noOfColumns; ++i) {
ColumnConst column = ndbTable.getColumn(i);
// primary key and partition key columns are listed in the order declared in the schema
if (column.getPartitionKey()) {
partitionKeyColumnNameList.add(column.getName());
}
if (column.getPrimaryKey()) {
primaryKeyColumnNameList.add(column.getName());
}
ColumnConst ndbColumn = ndbTable.getColumn(i);
String columnName = ndbColumn.getName();
ColumnImpl columnImpl = new ColumnImpl(tableName, ndbColumn);
columns.put(columnName, columnImpl);
columnImpls[i] = columnImpl;
columnNames[i] = columnName;
// find maximum column id
int columnId = ndbColumn.getColumnNo();
if (columnId > maximumColumnId) {
maximumColumnId = columnId;
}
}
// iterate columns again and construct layout of record in memory