@Test public void testInitialization() throws Exception { BatchDatabaseCollectionReader reader = (BatchDatabaseCollectionReader) new BatchDatabaseCollectionReader(dbConnectionInfo, new DataQueryInformation(query, "note", "id"), MIN_RECORD_NUMBER, TEST_CORPUS_SIZE, BATCH_SIZE) .setRandomBatches(4) .produceCollectionReader(); assertNotNull(reader); assertTrue(query.equals(reader.baseQuery)); assertTrue(reader.noteColumn.equals("note")); assertTrue(reader.idColumn.equals("id")); assertTrue(reader.randomBatches == 4); assertTrue(reader.minRecordNumber == MIN_RECORD_NUMBER); assertTrue(reader.maxRecordNumber == TEST_CORPUS_SIZE); assertTrue(reader.batchSize == BATCH_SIZE); }
public BatchDatabaseCollectionReader setRandomBatches(int randomBatches) { this.randomBatches = randomBatches; return this; }
BatchDatabaseCollectionReader extends DatabaseCollectionReader { public BatchDatabaseCollectionReader setRandomBatches(int randomBatches) { this.randomBatches = randomBatches; return this; } }
BatchDatabaseCollectionReader extends DatabaseCollectionReader { public BatchDatabaseCollectionReader setRandomBatches(int randomBatches) { this.randomBatches = randomBatches; return this; } BatchDatabaseCollectionReader();  BatchDatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation,
                                         DataQueryInformation dataQueryInformation,
                                         int minRecordNumber,
                                         int maxRecordNumber,
                                         int batchSize);  BatchDatabaseCollectionReader(String driver, String url, String username, String password, String query,
                                         String idColumn, String noteColumn,
                                         int minRecordNumber, int maxRecordNumber, int batchSize); }
BatchDatabaseCollectionReader extends DatabaseCollectionReader { public BatchDatabaseCollectionReader setRandomBatches(int randomBatches) { this.randomBatches = randomBatches; return this; } BatchDatabaseCollectionReader();  BatchDatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation,
                                         DataQueryInformation dataQueryInformation,
                                         int minRecordNumber,
                                         int maxRecordNumber,
                                         int batchSize);  BatchDatabaseCollectionReader(String driver, String url, String username, String password, String query,
                                         String idColumn, String noteColumn,
                                         int minRecordNumber, int maxRecordNumber, int batchSize); int getMinRecordNumber(); BatchDatabaseCollectionReader setMinRecordNumber(int minRecordNumber); int getMaxRecordNumber(); BatchDatabaseCollectionReader setMaxRecordNumber(int maxRecordNumber); int getBatchSize(); BatchDatabaseCollectionReader setBatchSize(int batchSize); int getRandomBatches(); BatchDatabaseCollectionReader setRandomBatches(int randomBatches); @Override void initialize(); @Override boolean hasNext(); }
BatchDatabaseCollectionReader extends DatabaseCollectionReader { public BatchDatabaseCollectionReader setRandomBatches(int randomBatches) { this.randomBatches = randomBatches; return this; } BatchDatabaseCollectionReader();  BatchDatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation,
                                         DataQueryInformation dataQueryInformation,
                                         int minRecordNumber,
                                         int maxRecordNumber,
                                         int batchSize);  BatchDatabaseCollectionReader(String driver, String url, String username, String password, String query,
                                         String idColumn, String noteColumn,
                                         int minRecordNumber, int maxRecordNumber, int batchSize); int getMinRecordNumber(); BatchDatabaseCollectionReader setMinRecordNumber(int minRecordNumber); int getMaxRecordNumber(); BatchDatabaseCollectionReader setMaxRecordNumber(int maxRecordNumber); int getBatchSize(); BatchDatabaseCollectionReader setBatchSize(int batchSize); int getRandomBatches(); BatchDatabaseCollectionReader setRandomBatches(int randomBatches); @Override void initialize(); @Override boolean hasNext();  }