this.add(new JLabel(new RandomText().getRandomSentence()));
@Override protected void generateRecord(long globalRecordIndex, int outputIndex) { regionKey.setSafe(outputIndex, globalRecordIndex); byte[] nameVal = regions.getValue((int) globalRecordIndex).getBytes(Charsets.UTF_8); name.setSafe(outputIndex, nameVal, 0, nameVal.length); // comment byte[] commentVal = commentRandom.nextValue().getBytes(Charsets.UTF_8); comment.setSafe(outputIndex, commentVal, 0, commentVal.length); }
String comment = commentRandom.nextValue();
protected RandomText randomText(long seed, TextPool textPool, double averageTextLength) { RandomText random = new RandomText(seed, textPool, averageTextLength); randoms.add(random); return random; }
@Override protected void generateRecord(long globalRecordIndex, int outputIndex) { nationKey.setSafe(outputIndex, globalRecordIndex); byte[] nameVal = nations.getValue((int) globalRecordIndex).getBytes(Charsets.UTF_8); name.setSafe(outputIndex, nameVal, 0, nameVal.length); regionKey.setSafe(outputIndex, nations.getWeight((int) globalRecordIndex)); // comment byte[] commentVal = commentRandom.nextValue().getBytes(Charsets.UTF_8); comment.setSafe(outputIndex, commentVal, 0, commentVal.length); }
protected void generateRecord(long globalRecordIndex, int outputIndex){ final long customerKey = globalRecordIndex; final long nationKey = nationKeyRandom.nextValue(); this.customerKey.setSafe(outputIndex, customerKey); this.nationKey.setSafe(outputIndex, nationKey); this.accountBalance.setSafe(outputIndex, accountBalanceRandom.nextValue()); set(outputIndex, customerName, String.format(ENGLISH, "Customer#%09d", customerKey)); set(outputIndex, address, addressRandom.nextValue()); set(outputIndex, phone, phoneRandom.nextValue(nationKey)); set(outputIndex, marketSegment, marketSegmentRandom.nextValue()); set(outputIndex, comment, commentRandom.nextValue()); set(outputIndex, date, LocalDate.of(yearRandom.nextValue(),1,1).toString()); }