package org.mwc.debrief.pepys.model;

import java.beans.PropertyVetoException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

import org.mwc.debrief.pepys.model.bean.DatafileTypes;
import org.mwc.debrief.pepys.model.bean.Datafiles;
import org.mwc.debrief.pepys.model.bean.States;

public class ProofOfConcept {
	public static void main(String []args)
	{
		try {
			List list = DatabaseConnection.getInstance().listAll(Datafiles.class, null);
			
			List list2 = DatabaseConnection.getInstance().listAll(DatafileTypes.class, null);
			
			List list3 = DatabaseConnection.getInstance().listAll(States.class, null);
			
			List list4 = DatabaseConnection.getInstance().listAll(States.class, "source_id = 3");
			
			for ( Object l : list ) {
				final Datafiles dataFile = (Datafiles)l;
				System.out.println("DataFile ID: " + dataFile.getDatafile_id());
			}
			
			for ( Object l : list2 ) {
				final DatafileTypes datafileTypes = (DatafileTypes)l;
				System.out.println("DataFile ID: " + datafileTypes.getDatafile_type_id());
			}
			
			for ( Object l : list3 ) {
				final States state = (States)l;
				System.out.println("DataFile ID: " + state.getState_id());
			}
			
			for ( Object l : list4 ) {
				final States state = (States)l;
				System.out.println("DataFile Filtered ID: " + state.getState_id());
			}
		} catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
				| IllegalArgumentException | InvocationTargetException | PropertyVetoException | SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}

@@ -753,17 +753,18 @@
 ce_id = 
-3
+16
 %22);%0A%09%09%09%0A
@@ -899,24 +899,57 @@
 atafile_id()
+ + %22, %22 + dataFile.getReference()
 );%0A%09%09%09%7D%0A%09%09%09%0A
@@ -1060,32 +1060,36 @@
 rintln(%22DataFile
+Type
  ID: %22 + datafil
@@ -1210,39 +1210,36 @@
 em.out.println(%22
-DataFil
+Stat
 e ID: %22 + state.
@@ -1353,25 +1353,16 @@
 rintln(%22
-DataFile 
 Filtered
@@ -1362,16 +1362,22 @@
 iltered 
+State 
 ID: %22 + 
@@ -1387,32 +1387,61 @@
 te.getState_id()
+ + %22, %22 + state.getLocation()
 );%0A%09%09%09%7D%0A%09%09%7D catc

Change filter, output more data