protected boolean isWebserviceInvocationAllowed(Calltype callType, Artist artist) { String sql = "select max(invocation_time) from library.webservice_history h" + " inner join music.artist a on a.id = h.artist_id" + " where calltype_id = " + callType.getDatabaseId() + " and a.artist_name = upper(?)"; Timestamp lastInvocation = jdbcTemplate.queryForObject(sql, new Object[] {artist.getName()}, Timestamp.class); return isWebserviceInvocationAllowed(callType, lastInvocation); }
@Override public String toString() { return String.format( "%s=%s (%d), for %s", artist.getName(), tagName, tagCount, lastFmUser.getLastFmUsername()); }