@Test(expected = NullPointerException.class) public void startEntry_shouldThrowOnNullArgument() { logEntryDAO.startEntry(null); }
public void startEntry(LogEntry entry) { Preconditions.checkNotNull(entry); Preconditions.checkNotNull(entry.getPluginId()); Preconditions.checkNotNull(entry.getPluginId().getUri()); Preconditions.checkNotNull(entry.getPluginId().getVersion()); Preconditions.checkNotNull(entry.getStartDate()); Preconditions.checkNotNull(entry.getConfiguration()); String serializedConfiguration = entry.getConfiguration().marshal(); startEntry.update(entry.getTenantId(), entry.getPluginId().getUri().toASCIIString(), entry.getPluginId().getVersion().toString(), entry.getStartDate(), entry.getAssocTypeId(), serializedConfiguration); }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public void startEntry(LogEntry entry) { Preconditions.checkNotNull(entry); Preconditions.checkNotNull(entry.getPluginId()); Preconditions.checkNotNull(entry.getPluginId().getUri()); Preconditions.checkNotNull(entry.getPluginId().getVersion()); Preconditions.checkNotNull(entry.getStartDate()); Preconditions.checkNotNull(entry.getConfiguration()); String serializedConfiguration = entry.getConfiguration().marshal(); startEntry.update(entry.getTenantId(), entry.getPluginId().getUri().toASCIIString(), entry.getPluginId().getVersion().toString(), entry.getStartDate(), entry.getAssocTypeId(), serializedConfiguration); } }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public void startEntry(LogEntry entry) { Preconditions.checkNotNull(entry); Preconditions.checkNotNull(entry.getPluginId()); Preconditions.checkNotNull(entry.getPluginId().getUri()); Preconditions.checkNotNull(entry.getPluginId().getVersion()); Preconditions.checkNotNull(entry.getStartDate()); Preconditions.checkNotNull(entry.getConfiguration()); String serializedConfiguration = entry.getConfiguration().marshal(); startEntry.update(entry.getTenantId(), entry.getPluginId().getUri().toASCIIString(), entry.getPluginId().getVersion().toString(), entry.getStartDate(), entry.getAssocTypeId(), serializedConfiguration); } protected  LogEntryDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService,
                                   PluginRegistry pluginRegistry); }
LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public void startEntry(LogEntry entry) { Preconditions.checkNotNull(entry); Preconditions.checkNotNull(entry.getPluginId()); Preconditions.checkNotNull(entry.getPluginId().getUri()); Preconditions.checkNotNull(entry.getPluginId().getVersion()); Preconditions.checkNotNull(entry.getStartDate()); Preconditions.checkNotNull(entry.getConfiguration()); String serializedConfiguration = entry.getConfiguration().marshal(); startEntry.update(entry.getTenantId(), entry.getPluginId().getUri().toASCIIString(), entry.getPluginId().getVersion().toString(), entry.getStartDate(), entry.getAssocTypeId(), serializedConfiguration); } 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 void startEntry(LogEntry entry) { Preconditions.checkNotNull(entry); Preconditions.checkNotNull(entry.getPluginId()); Preconditions.checkNotNull(entry.getPluginId().getUri()); Preconditions.checkNotNull(entry.getPluginId().getVersion()); Preconditions.checkNotNull(entry.getStartDate()); Preconditions.checkNotNull(entry.getConfiguration()); String serializedConfiguration = entry.getConfiguration().marshal(); startEntry.update(entry.getTenantId(), entry.getPluginId().getUri().toASCIIString(), entry.getPluginId().getVersion().toString(), entry.getStartDate(), entry.getAssocTypeId(), serializedConfiguration); } 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();  }