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