1 /* 2 * Created on Jun 20, 2005 3 * 4 */ 5 package org.musicontroller.gui.components; 6 7 8 import java.util.Collection; 9 10 import org.apache.tapestry.BaseComponent; 11 import org.musicontroller.core.Event; 12 13 public abstract class EventList extends BaseComponent { 14 public abstract Collection<Event> getEvents(); 15 public abstract void setEvents(Collection<Event> events); 16 17 public abstract Event getEvent(); 18 public abstract void setEvent(Event event); 19 20 /* Neighbouring tracks: tracks that are played within [songlength] minutes around [song] 21 * 22 * Neighbours of 'Incident on Jupiter': 23 * select n.song_id, count(n.moment) from event ev, event n 24 where ev.song_id=9114 and ev.user_id=2 and ev.eventkind=2 25 and n.user_id=2 and n.eventkind=2 26 and n.song_id<>ev.song_id and (n.moment between ev.moment - time '0:10' and ev.moment + time '0:10') 27 group by n.song_id 28 having count(n.moment)>5 29 order by count(n.moment) desc 30 * 31 * TODO append clausule that restricts ev.events to be no less than one year old? 32 */ 33 }