@Test(expected = IllegalArgumentException.class) public void getLogEntriesForTenant_shouldThrowOnNegativeOffset() { logEntryDAO.getLogEntriesForTenant(1, -1, Integer.MAX_VALUE); }
public List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit) { Preconditions.checkArgument(offset >= 0, "offset must be greater than or equal to 0"); Preconditions.checkArgument(limit >= 0, "limit must be greater than or equal to 0"); return getLogEntriesForTenant.execute(tenantId, offset, limit); }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit) { Preconditions.checkArgument(offset >= 0, "offset must be greater than or equal to 0"); Preconditions.checkArgument(limit >= 0, "limit must be greater than or equal to 0"); return getLogEntriesForTenant.execute(tenantId, offset, limit); } }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit) { Preconditions.checkArgument(offset >= 0, "offset must be greater than or equal to 0"); Preconditions.checkArgument(limit >= 0, "limit must be greater than or equal to 0"); return getLogEntriesForTenant.execute(tenantId, offset, limit); } protected  LogEntryDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService,
                                   PluginRegistry pluginRegistry); }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit) { Preconditions.checkArgument(offset >= 0, "offset must be greater than or equal to 0"); Preconditions.checkArgument(limit >= 0, "limit must be greater than or equal to 0"); return getLogEntriesForTenant.execute(tenantId, offset, limit); } protected  LogEntryDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService,
                                   PluginRegistry pluginRegistry); @Override String getDefaultTableName(); @Override String getTableCreatingSQLScriptName(); void startEntry(LogEntry entry); void endEntry(LogEntry entry); void endAllEntries(Date endDate); void endAllEntries(); void deleteEntry(LogEntry entry); List<Integer> getRunningTenants(); List<LogEntry> getLogEntries(int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit); List<LogEntry> getLogEntries(int assocTypeId, int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int assocTypeId, int offset, int limit); int getNumberOfLogEntries(); int getNumberOfLogEntriesForTenant(int tenantId); void deleteLogEntries(); int getComputationDurationForDate(Date date); int getComputationDurationForDate(); }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit) { Preconditions.checkArgument(offset >= 0, "offset must be greater than or equal to 0"); Preconditions.checkArgument(limit >= 0, "limit must be greater than or equal to 0"); return getLogEntriesForTenant.execute(tenantId, offset, limit); } protected  LogEntryDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService,
                                   PluginRegistry pluginRegistry); @Override String getDefaultTableName(); @Override String getTableCreatingSQLScriptName(); void startEntry(LogEntry entry); void endEntry(LogEntry entry); void endAllEntries(Date endDate); void endAllEntries(); void deleteEntry(LogEntry entry); List<Integer> getRunningTenants(); List<LogEntry> getLogEntries(int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit); List<LogEntry> getLogEntries(int assocTypeId, int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int assocTypeId, int offset, int limit); int getNumberOfLogEntries(); int getNumberOfLogEntriesForTenant(int tenantId); void deleteLogEntries(); int getComputationDurationForDate(Date date); int getComputationDurationForDate();  }