public void setLong(int column, long value) { table.setLong(row, column, value); }
public void setLong(int column, long value) { table.setLong(row, column, value); }
public void setLong(String columnName, long value) { table.setLong(row, columnName, value); }
public void setLong(String columnName, long value) { table.setLong(row, columnName, value); }
public void setLong(int row, String columnName, long value) { setLong(row, getColumnIndex(columnName), value); }
public void setLong(int row, String columnName, long value) { setLong(row, getColumnIndex(columnName), value); }
break; case LONG: setLong(row, col, input.readLong()); break; case FLOAT:
break; case LONG: setLong(row, col, input.readLong()); break; case FLOAT:
long numberOfObjects = 1000000; SharedGroup sharedGroup = new SharedGroup("default.realm"); WriteTransaction writeTransaction = sharedGroup.beginWrite(); Table table = writeTransaction.getTable("class_Product"); table.addEmptyRows(numberOfObjects); for (int i = 0; i < numberOfObjects; i++) { table.setLong(0, i, i); // id table.setString(1, i, "Product_"+i); // name table.setString(2, i, "SKU__"+i); // sku table.SetDate(3, i, new Date()); // date } writeTransaction.commit(); sharedGroup.close();
case STRING: setString(row, col, rs.getString(col+1)); break; case INT: setInt(row, col, rs.getInt(col+1)); break; case LONG: setLong(row, col, rs.getLong(col+1)); break; case FLOAT: setFloat(row, col, rs.getFloat(col+1)); break; case DOUBLE: setDouble(row, col, rs.getDouble(col+1)); break;
case STRING: setString(row, col, rs.getString(col+1)); break; case INT: setInt(row, col, rs.getInt(col+1)); break; case LONG: setLong(row, col, rs.getLong(col+1)); break; case FLOAT: setFloat(row, col, rs.getFloat(col+1)); break; case DOUBLE: setDouble(row, col, rs.getDouble(col+1)); break;
break; case LONG: setLong(row, col, source.getLong(col)); break; case FLOAT:
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
protected Table createSubset(int[] rowSubset) { Table newbie = new Table(); newbie.setColumnTitles(columnTitles); // also sets columns.length newbie.columnTypes = columnTypes; newbie.setRowCount(rowSubset.length); for (int i = 0; i < rowSubset.length; i++) { int row = rowSubset[i]; for (int col = 0; col < columns.length; col++) { switch (columnTypes[col]) { case STRING: newbie.setString(i, col, getString(row, col)); break; case INT: newbie.setInt(i, col, getInt(row, col)); break; case LONG: newbie.setLong(i, col, getLong(row, col)); break; case FLOAT: newbie.setFloat(i, col, getFloat(row, col)); break; case DOUBLE: newbie.setDouble(i, col, getDouble(row, col)); break; } } } return newbie; }
break; case LONG: setLong(row, col, source.getLong(col)); break; case FLOAT: