@Test public void testValidateParams() throws IOException { DatabaseCollectionReader dcr = new DatabaseCollectionReader(dbConnectionInfo, "seled id, note from RYAN", "ID", "NOTE"); }
protected void validateParams(String query, String idColumn, String noteColumn) { if(StringUtils.isBlank(query)) { throw new IllegalArgumentException("Query String cannot be blank!"); } if(StringUtils.isBlank(idColumn)) { throw new IllegalArgumentException("ID column cannot be blank!"); } if(StringUtils.isBlank(noteColumn)) { throw new IllegalArgumentException("Note column cannot blank!"); } if(!query.toLowerCase().contains(idColumn.toLowerCase())) { throw new IllegalArgumentException("ID column, " + idColumn + " was not found in the query! " + query); } if(!query.toLowerCase().contains(noteColumn.toLowerCase())) { throw new IllegalArgumentException("Note column, " + noteColumn + ", was not found in the query! " + query); } }
DatabaseCollectionReader extends BaseDatabaseCollectionReader { protected void validateParams(String query, String idColumn, String noteColumn) { if(StringUtils.isBlank(query)) { throw new IllegalArgumentException("Query String cannot be blank!"); } if(StringUtils.isBlank(idColumn)) { throw new IllegalArgumentException("ID column cannot be blank!"); } if(StringUtils.isBlank(noteColumn)) { throw new IllegalArgumentException("Note column cannot blank!"); } if(!query.toLowerCase().contains(idColumn.toLowerCase())) { throw new IllegalArgumentException("ID column, " + idColumn + " was not found in the query! " + query); } if(!query.toLowerCase().contains(noteColumn.toLowerCase())) { throw new IllegalArgumentException("Note column, " + noteColumn + ", was not found in the query! " + query); } } }
DatabaseCollectionReader extends BaseDatabaseCollectionReader { protected void validateParams(String query, String idColumn, String noteColumn) { if(StringUtils.isBlank(query)) { throw new IllegalArgumentException("Query String cannot be blank!"); } if(StringUtils.isBlank(idColumn)) { throw new IllegalArgumentException("ID column cannot be blank!"); } if(StringUtils.isBlank(noteColumn)) { throw new IllegalArgumentException("Note column cannot blank!"); } if(!query.toLowerCase().contains(idColumn.toLowerCase())) { throw new IllegalArgumentException("ID column, " + idColumn + " was not found in the query! " + query); } if(!query.toLowerCase().contains(noteColumn.toLowerCase())) { throw new IllegalArgumentException("Note column, " + noteColumn + ", was not found in the query! " + query); } } DatabaseCollectionReader();  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, DataQueryInformation dataQueryInformation);  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, String query, String idColumn, String noteColumn);  DatabaseCollectionReader(String driver, String url, String username, String password, String query, String idColumn, String noteColumn); }
DatabaseCollectionReader extends BaseDatabaseCollectionReader { protected void validateParams(String query, String idColumn, String noteColumn) { if(StringUtils.isBlank(query)) { throw new IllegalArgumentException("Query String cannot be blank!"); } if(StringUtils.isBlank(idColumn)) { throw new IllegalArgumentException("ID column cannot be blank!"); } if(StringUtils.isBlank(noteColumn)) { throw new IllegalArgumentException("Note column cannot blank!"); } if(!query.toLowerCase().contains(idColumn.toLowerCase())) { throw new IllegalArgumentException("ID column, " + idColumn + " was not found in the query! " + query); } if(!query.toLowerCase().contains(noteColumn.toLowerCase())) { throw new IllegalArgumentException("Note column, " + noteColumn + ", was not found in the query! " + query); } } DatabaseCollectionReader();  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, DataQueryInformation dataQueryInformation);  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, String query, String idColumn, String noteColumn);  DatabaseCollectionReader(String driver, String url, String username, String password, String query, String idColumn, String noteColumn); String getQuery(); T setQuery(String query); String getIdColumn(); T setIdColumn(String idColumn); String getNoteColumn(); T setNoteColumn(String noteColumn); @Override void getNext(CAS aCAS); @Override boolean hasNext(); @Override Progress[] getProgress(); }
DatabaseCollectionReader extends BaseDatabaseCollectionReader { protected void validateParams(String query, String idColumn, String noteColumn) { if(StringUtils.isBlank(query)) { throw new IllegalArgumentException("Query String cannot be blank!"); } if(StringUtils.isBlank(idColumn)) { throw new IllegalArgumentException("ID column cannot be blank!"); } if(StringUtils.isBlank(noteColumn)) { throw new IllegalArgumentException("Note column cannot blank!"); } if(!query.toLowerCase().contains(idColumn.toLowerCase())) { throw new IllegalArgumentException("ID column, " + idColumn + " was not found in the query! " + query); } if(!query.toLowerCase().contains(noteColumn.toLowerCase())) { throw new IllegalArgumentException("Note column, " + noteColumn + ", was not found in the query! " + query); } } DatabaseCollectionReader();  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, DataQueryInformation dataQueryInformation);  DatabaseCollectionReader(DatabaseConnectionInformation databaseConnectionInformation, String query, String idColumn, String noteColumn);  DatabaseCollectionReader(String driver, String url, String username, String password, String query, String idColumn, String noteColumn); String getQuery(); T setQuery(String query); String getIdColumn(); T setIdColumn(String idColumn); String getNoteColumn(); T setNoteColumn(String noteColumn); @Override void getNext(CAS aCAS); @Override boolean hasNext(); @Override Progress[] getProgress();  }