/**
 * 
 */
package uk.ac.ucl.excites.sapelli.storage.queries;

import uk.ac.ucl.excites.sapelli.storage.model.Record;

/**
 * @author mstevens
 *
 */
public abstract class SelectionQuery
{
	
	public boolean select(Record record)
	{
		return record != null & isValid(record);
	}
	
	protected abstract boolean isValid(Record record);
	
	protected abstract void accept(QueryBuilder builder);

}

@@ -62,16 +62,71 @@
 ies;%0D%0A%0D%0A
+import java.util.ArrayList;%0D%0Aimport java.util.List;%0D%0A%0D%0A
 import u
@@ -254,16 +254,210 @@
 %0D%0A%7B%0D%0A%09%0D%0A
+%09public List%3CRecord%3E filter(List%3CRecord%3E records)%0D%0A%09%7B%0D%0A%09%09List%3CRecord%3E result = new ArrayList%3CRecord%3E();%0D%0A%09%09for(Record r : records)%0D%0A%09%09%09if(select(r))%0D%0A%09%09%09%09result.add(r);%0D%0A%09%09return result;%0D%0A%09%7D%0D%0A%0D%0A
 %09public 

Work on the SelectionQuery