Index: ptor-mua/trunk/src/test/java/uk/ac/cardiff/raptormua/engine/statistics/ReflectionHelperTest.java
===================================================================
--- /raptor-mua/trunk/src/test/java/uk/ac/cardiff/raptormua/engine/statistics/ReflectionHelperTest.java	(revision 667)
+++ 	(revision )
@@ -1,39 +1,0 @@
-/**
- * Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package uk.ac.cardiff.raptormua.engine.statistics;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
-
-public class ReflectionHelperTest {
-	
-	@Test
-	public void testFindClassForField(){		
-			String classForField = ReflectionHelper.findEntrySubclassForMethod("principalName");
-			System.out.println("ShibbolethEntry = "+classForField);
-			equals(classForField.equals("ShibbolethIdpAuthenticationEvent"));
-			
-			classForField = ReflectionHelper.findEntrySubclassForMethod("serviceHost");
-			System.out.println("Event = "+classForField);
-			equals(classForField.equals("Event"));
-			
-			
-	}
-
-}
Index: ptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/EntryHandler.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/EntryHandler.java	(revision 667)
+++ 	(revision )
@@ -1,105 +1,0 @@
-/**
- * Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *
- * @author philsmart
- * {@literal} this class manages interaction with the internal model of the ICA
- *
- */
-
-package uk.ac.cardiff.raptormua.model;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import uk.ac.cardiff.model.event.Event;
-
-import org.apache.log4j.Logger;
-import org.joda.time.DateTime;
-
-
-public interface EntryHandler {
-
-
-
-    	/**
-    	 *
-    	 * @param entries
-    	 */
-	public void addEntries(List<Event> entries);
-
-	/**
-	 *
-	 * @return
-	 */
-	public Set<Event> getEntries();
-
-	/**
-	 *
-	 * @param entries
-	 */
-	public void setEntries(Set<Event> entries);
-
-	/**
-	 *
-	 */
-	public void removeAllEntries();
-
-	/**
-	 *
-	 */
-	public void endTransaction();
-
-	/**
-	 *
-	 */
-	public void initialise();
-
-	/**
-	 *
-	 * @param query
-	 * @return
-	 */
-	public List query(String query);
-
-	/**
-	 *
-	 * @param query
-	 * @return
-	 */
-	public Object queryUnique(String query);
-
-	/**
-	 *
-	 * @return
-	 */
-	public int getNumberOfEntries();
-
-	/**
-	 * @param query
-	 * @param parameters
-	 * @return
-	 */
-	public Object queryUnique(String query, Object[] parameters);
-
-        /**
-         * @param events
-         */
-        public void addEntriesAsynchronous(List<Event> events);
-
-
-
-}
Index: ptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/PersistantEntryHandler.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/PersistantEntryHandler.java	(revision 667)
+++ 	(revision )
@@ -1,200 +1,0 @@
-/**
- * Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- *
- */
-package uk.ac.cardiff.raptormua.model;
-
-import java.util.ArrayList;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.FutureTask;
-
-import org.joda.time.DateTime;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import uk.ac.cardiff.model.event.Event;
-import uk.ac.cardiff.model.event.ShibbolethIdpAuthenticationEvent;
-import uk.ac.cardiff.raptormua.dao.MUADataConnection;
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
-
-/**
- * @author philsmart
- *
- */
-public class PersistantEntryHandler implements EntryHandler {
-	// TODO can use the spring initialisation callback methods to initials the
-	// bean after all properties set etc, rather than initialising on the set
-	// method of the engine class
-
-	/** class logger */
-	private final Logger log = LoggerFactory.getLogger(PersistantEntryHandler.class);
-
-	/** data connection used to persist entries */
-	private MUADataConnection dataConnection;
-
-	/**
-	 * set of all entries stored by this EntryHandler should never be used as
-	 * memory overhead is too high for large databases
-	 */
-	Set<Event> entries;
-
-	public PersistantEntryHandler(MUADataConnection dataConnection) {
-		this.setDataConnection(dataConnection);
-
-	}
-
-	/**
-	 * Initialises the entry handler. In particular, loads all entries from the
-	 * main datastore, through the <code>dataConnection</code> instance.
-	 */
-	public void initialise() {
-		log.info("Persistant entry handler [{}] initialising", this);
-		Integer rowCount = (Integer) dataConnection.runQueryUnique("select count(*) from Event", null);
-		log.info("Persistent data store has {} entries", rowCount);
-		log.info("Persistant entry handler [{}] started", this);
-	}
-
-	/**
-	 * This method loads all <code>Entries</code> in the <code>entries</code>
-	 * variable. This method is often not used as large datasets will require
-	 * vast amounts of memory
-	 */
-	private void loadEntries() {
-		log.info("Loading entries from main datastore");
-		List<Event> entriesAsList = dataConnection.runQuery("from Event", null);
-		log.info("MUA has loaded " + entriesAsList.size() + " entries from main datastore");
-		entries = new LinkedHashSet<Event>(entriesAsList);
-	}
-
-
-	public List query(String query) {
-		// log.debug("SQL query to entry handler [{}]",query);
-		return dataConnection.runQuery(query, null);
-	}
-
-
-	public Object queryUnique(String query) {
-		// log.debug("SQL query to entry handler [{}]",query);
-		return dataConnection.runQueryUnique(query, null);
-	}
-
-
-	public Object queryUnique(String query, Object[] parameters) {
-		return dataConnection.runQueryUnique(query, parameters);
-	}
-
-
-	public void addEntries(List<Event> entries) {
-		log.info("Persistent Entry Handler has {} entries, with {} new entries inputted", this.getNumberOfEntries(),
-				entries.size());
-		int duplicates = 0;
-		for (Event entry : entries) {
-			int hashcode = 0;
-			try {
-				hashcode = ((Integer) ReflectionHelper.getValueFromObject("hashCode", entry)).intValue();
-			} catch (Exception e) {
-			}
-			int numberOfDuplicates = ((Integer) dataConnection.runQueryUnique("select count(*) from "
-					+ entry.getClass().getSimpleName() + " where eventTime = '" + entry.getEventTime()
-					+ "' and hashCode ='" + hashcode + "'", null)).intValue();
-			if (numberOfDuplicates == 0)
-				dataConnection.save(entry);
-			else
-				duplicates++;
-		}
-
-		log.info("Total No. of Entries after addition = {}, finding {} duplicates", this.getNumberOfEntries(),
-				duplicates);
-	}
-
-	public void addEntry(Event entry) {
-		entries.add(entry);
-
-	}
-
-
-	public void endTransaction() {
-		log.debug("Saving transaction for MUA");
-		dataConnection.saveAll(entries);
-		log.debug("Saving transaction for MUA...Done");
-	}
-
-
-	public Set getEntries() {
-		return entries;
-	}
-
-
-	public void removeAllEntries() {
-		log.debug("Removing all entries from this entry handler");
-		dataConnection.deleteAllEntries(entries);
-		// entries should never be used, but clear in case
-		entries.clear();
-	}
-
-	public void setDataConnection(MUADataConnection dataConnection) {
-		this.dataConnection = dataConnection;
-	}
-
-	public MUADataConnection getDataConnection() {
-		return dataConnection;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see uk.ac.cardiff.RaptorUA.model.EntryHandler#setEntries(java.util.Set)
-	 */
-	@Override
-	public void setEntries(Set<Event> entries) {
-		// TODO Auto-generated method stub
-
-	}
-
-	/*
-	 * (non-Javadoc)
-	 *
-	 * @see uk.ac.cardiff.raptormua.model.EntryHandler#getNumberOfEntries()
-	 */
-	@Override
-	public int getNumberOfEntries() {
-		return (Integer) dataConnection.runQueryUnique("select count(*) from Event", null);
-	}
-
-        /* (non-Javadoc)
-         * @see uk.ac.cardiff.raptormua.model.EntryHandler#addEntriesAsynchronous(java.util.List)
-         */
-        public void addEntriesAsynchronous(List<Event> events) {
-            FutureTask<Boolean> task = new FutureTask<Boolean>(new PersistentEntriesTask());
-            ExecutorService es = Executors.newSingleThreadExecutor();
-            es.submit(task);
-            try {
-                task.get();
-                System.out.println ("Result from task.get () = ");
-            }
-            catch (Exception e) {
-               System.err.println (e);
-            }
-           es.shutdown ();
-
-        }
-
-}
Index: ptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/PersistentEntriesTask.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/model/PersistentEntriesTask.java	(revision 667)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/**
- *
- */
-package uk.ac.cardiff.raptormua.model;
-
-import java.util.concurrent.Callable;
-
-import uk.ac.cardiff.raptormua.dao.MUADataConnection;
-
-/**
- * @author philsmart
- *
- */
-public class PersistentEntriesTask implements Callable{
-
-    private MUADataConnection dataConnection;
-
-    public Object call() throws Exception {
-        this.wait(10000);
-        return null;
-    }
-
-    /**
-     * @param dataConnection the dataConnection to set
-     */
-    public void setDataConnection(MUADataConnection dataConnection) {
-        this.dataConnection = dataConnection;
-    }
-
-    /**
-     * @return the dataConnection
-     */
-    public MUADataConnection getDataConnection() {
-        return dataConnection;
-    }
-
-}
Index: ptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/runtimeutils/ReflectionHelper.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/runtimeutils/ReflectionHelper.java	(revision 667)
+++ 	(revision )
@@ -1,385 +1,0 @@
-/**
- * Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- *
- */
-package uk.ac.cardiff.raptormua.runtimeutils;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.jar.JarEntry;
-import java.util.jar.JarInputStream;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import sun.misc.Launcher;
-
-/**
- * @author philsmart
- *
- */
-public class ReflectionHelper {
-	
-	/** Class logger */
-	private final static Logger log = LoggerFactory.getLogger(ReflectionHelper.class);
-
-	public static String determineSubclassForMethods(String methodOne, String methodTwo) {
-		Object methodOneObject = findEntrySubclassForMethodAsObject(methodOne);
-		Object methodTwoObject = findEntrySubclassForMethodAsObject(methodTwo);
-		log.debug("Classes found, methodOne {}, methodTwo {}", methodOneObject.getClass(), methodTwoObject.getClass());
-		// is methodTwoObject a superclass of methodOneObject, if it is, then
-		// its either an equivalent class
-		// or its a subclass so return it
-		log.debug("Is methodOne a superclass of methodTwo {}",
-				(methodOneObject.getClass().isAssignableFrom(methodTwoObject.getClass())));
-		if (methodTwoObject.getClass().isAssignableFrom(methodOneObject.getClass())) {
-			return methodOneObject.getClass().getSimpleName();
-		} else {
-			return methodTwoObject.getClass().getSimpleName();
-		}
-
-	}
-
-	public static List<String> getFieldsFromEntrySubClasses(){
-		ArrayList<String> allFields = new ArrayList<String>();
-		String forPckgName = "uk.ac.cardiff.model";
-		String jarFile = getJARFilePath(forPckgName);
-		jarFile = jarFile.replace("file:", "");
-		List<String> classes = getClasseNamesInPackageJAR(jarFile, forPckgName);
-
-		ArrayList allclasses = new ArrayList();
-		for (String classname : classes) {
-			try {
-				Object o = Class.forName(classname.replace(".class", "")).newInstance();
-				//if (o!=null)log.debug("found object {}",o.getClass());
-				if (o instanceof uk.ac.cardiff.model.event.Event) {
-					allclasses.add(o);
-				}
-			} catch (ClassNotFoundException cnfex) {
-				log.error("error getting subclasses of Entry, {}", cnfex);
-			} catch (InstantiationException iex) {
-				//log.error("{}", iex);
-			} catch (IllegalAccessException iaex) {
-				// The class is not public
-				//log.error("{}", iaex);
-			}
-		}
-		for (Object object : allclasses) {
-			Field[] fields = object.getClass().getDeclaredFields();
-			for (Field field : fields){
-				allFields.add(field.getName());
-			}
-
-		}
-
-		return allFields;
-	}
-
-
-	public static Object findEntrySubclassForMethodAsObject(String fieldName) {
-		String forPckgName = "uk.ac.cardiff.model";
-		String jarFile = getJARFilePath(forPckgName);
-		jarFile = jarFile.replace("file:", "");
-		List<String> classes = getClasseNamesInPackageJAR(jarFile, forPckgName);
-		ArrayList allclasses = new ArrayList();
-		for (String classname : classes) {
-			try {
-				Object o = Class.forName(classname.replace(".class", "")).newInstance();
-				if (o instanceof uk.ac.cardiff.model.event.Event) {
-					allclasses.add(o);
-				}
-			} catch (ClassNotFoundException cnfex) {
-				log.error("{}", cnfex);
-			} catch (InstantiationException iex) {
-				// We try to instantiate an interface
-				// or an object that does not have a
-				// default constructor
-			} catch (IllegalAccessException iaex) {
-				// The class is not public
-			}
-		}
-
-		Object objectWithMethod = null;
-		for (Object object : allclasses) {
-			if (hasField(object, fieldName)) {
-				objectWithMethod = object;
-			}
-		}
-		if (objectWithMethod != null) {
-			log.debug("Object " + objectWithMethod.getClass().getName() + " has method " + fieldName
-					+ " returning simple name " + objectWithMethod.getClass().getSimpleName());
-			return objectWithMethod;
-		}
-
-		return null;
-
-	}
-
-	/**
-	 * This method finds the simple name of the class in the uk.ac.cardiff.model
-	 * package that contains the <code>fieldName</code>.
-	 *
-	 * @param fieldName
-	 * @return
-	 */
-	public static String findEntrySubclassForMethod(String fieldName) {
-		String forPckgName = "uk.ac.cardiff.model";
-		String jarFile = getJARFilePath(forPckgName);
-		jarFile = jarFile.replace("file:", "");
-		List<String> classes = getClasseNamesInPackageJAR(jarFile, forPckgName);
-		ArrayList allclasses = new ArrayList();
-		for (String classname : classes) {
-			try {
-				Object o = Class.forName(classname.replace(".class", "")).newInstance();
-				if (o instanceof uk.ac.cardiff.model.event.Event) {
-					// log.debug("Found classname: "+classname.replace(".class",
-					// ""));
-					allclasses.add(o);
-				}
-			} catch (ClassNotFoundException cnfex) {
-				log.error("{}", cnfex);
-			} catch (InstantiationException iex) {
-				// We try to instantiate an interface
-				// or an object that does not have a
-				// default constructor
-			} catch (IllegalAccessException iaex) {
-				// The class is not public
-			}
-		}
-
-		Object objectWithMethod = null;
-		for (Object object : allclasses) {
-			if (hasField(object, fieldName)) {
-				objectWithMethod = object;
-			}
-		}
-		if (objectWithMethod != null) {
-			log.debug("Object " + objectWithMethod.getClass().getName() + " has method " + fieldName
-					+ " returning simple name " + objectWithMethod.getClass().getSimpleName());
-			return objectWithMethod.getClass().getSimpleName();
-		}
-
-		return null;
-
-	}
-
-	/**
-	 * Gets the name, as a string, of the JAR file that contains the package
-	 * <code>pckgname</code>
-	 *
-	 * @param pckgname
-	 * @return
-	 */
-	private static String getJARFilePath(String pckgname) {
-		String name = new String(pckgname);
-		if (!name.startsWith("/")) {
-			name = "/" + name;
-		}
-		name = name.replace('.', '/');
-		//log.debug("package name: " + name);
-		URL url = ReflectionHelper.class.getResource(name);
-		//log.debug("URL: "+url);
-		if (url != null && url.getPath().contains("!"))
-			return url.getPath().substring(0, url.getPath().indexOf('!'));
-		else if (url != null)
-			return url.getPath();
-		else
-			return null;
-	}
-
-	/**
-	 * Gets the names of the classes, as strings, in the jar
-	 * <code>jarName</code> and package <code>packageName</code>
-	 *
-	 * @param jarName
-	 * @param packageName
-	 * @return
-	 */
-	public static List<String> getClasseNamesInPackageJAR(String jarName, String packageName) {
-		ArrayList<String> classes = new ArrayList<String>();
-		packageName = packageName.replaceAll("\\.", "/");
-		try {
-			JarInputStream jarFile = new JarInputStream(new FileInputStream(jarName));
-			JarEntry jarEntry;
-			while (true) {
-				jarEntry = jarFile.getNextJarEntry();
-				if (jarEntry == null) {
-					break;
-				}
-				if ((jarEntry.getName().startsWith(packageName)) && (jarEntry.getName().endsWith(".class"))) {
-					classes.add(jarEntry.getName().replaceAll("/", "\\."));
-				}
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return classes;
-	}
-
-	/**
-	 * Code taken and adapted from the JWhich project. Finds all subclasses of
-	 * the uk.ac.cardiff.model.Entry class in the package <code>pckgname</code>
-	 * if they exist outside any JAR libraries, use
-	 * <code>getClasseNamesInPackageJAR</code>
-	 *
-	 * @param pckgname
-	 * @return
-	 */
-	private static Object[] subclassesInDirectory(String pckgname) {
-		ArrayList<Object> allclasses = new ArrayList();
-
-		String name = new String(pckgname);
-		if (!name.startsWith("/")) {
-			name = "/" + name;
-		}
-		name = name.replace('.', '/');
-
-		// Get a File object for the package
-		log.debug("package name: " + name);
-		URL url = ReflectionHelper.class.getResource(name);
-		log.debug("URL: " + url);
-		File directory = new File(url.getFile());
-
-		// New code
-		// ======
-		if (directory.exists()) {
-			// Get the list of the files contained in the package
-			String[] files = directory.list();
-			for (int i = 0; i < files.length; i++) {
-
-				// we are only interested in .class files
-				if (files[i].endsWith(".class")) {
-					// removes the .class extension
-					String classname = files[i].substring(0, files[i].length() - 6);
-					try {
-						log.debug("classname: " + classname);
-						// Try to create an instance of the object
-						Object o = Class.forName(pckgname + "." + classname).newInstance();
-						if (o instanceof uk.ac.cardiff.model.event.Event) {
-							// log.debug("Found classname: "+classname);
-							allclasses.add(o);
-						}
-					} catch (ClassNotFoundException cnfex) {
-						log.error("{}", cnfex);
-					} catch (InstantiationException iex) {
-						// We try to instantiate an interface
-						// or an object that does not have a
-						// default constructor
-					} catch (IllegalAccessException iaex) {
-						// The class is not public
-					}
-				}
-			}
-		}
-		return allclasses.toArray();
-	}
-
-	/**
-	 * Checks whether the Object <code>object</code> has the field
-	 * <code>fieldName</code>
-	 *
-	 * @param object
-	 * @param fieldName
-	 * @return
-	 */
-	private static Boolean hasField(Object object, String fieldName) {
-		try {
-			Field[] fields = object.getClass().getDeclaredFields();
-			for (Field field : fields)
-				if (field.getName().equals(fieldName))
-					return true;
-
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-		return false;
-
-	}
-
-	public static String prepareMethodNameSet(String method) {
-		if (method.length() > 0) {
-			String name = "set";
-			// now capitalise the first letter of the method name
-			Character firstLetter = method.charAt(0);
-			firstLetter = Character.toUpperCase(firstLetter);
-			String newMethodName = method.substring(1, method.length());
-			name += firstLetter + newMethodName;
-			// System.out.println("method name: " + name);
-			return name;
-
-		}
-		return method;
-
-	}
-
-	/**
-	 * @param fieldname
-	 * @return
-	 */
-	public static String prepareMethodNameGet(String method) {
-		if (method.length() > 0) {
-			String name = "get";
-			// now capitalise the first letter of the method name
-			Character firstLetter = method.charAt(0);
-			firstLetter = Character.toUpperCase(firstLetter);
-			String newMethodName = method.substring(1, method.length());
-			name += firstLetter + newMethodName;
-			// System.out.println("method name: " + name);
-			return name;
-
-		}
-		return method;
-	}
-
-	public static Object getValueFromObject(String fieldname, Object object) {
-		try {
-			Class id = object.getClass();
-			String fieldAsMethod = ReflectionHelper.prepareMethodNameGet(fieldname);
-			Method getter = id.getMethod(fieldAsMethod, new Class[] {});
-			// log.debug("Trying to Set :"+param)
-			Object result = getter.invoke(object, new Object[] {});
-			return result;
-		} catch (Throwable e) {
-			log.error("Field name '" + fieldname + "' does not match internal model attribute");
-			e.printStackTrace();
-			// System.exit(1);
-
-		}
-		return null;
-	}
-
-	public static void setValueOnObject(String fieldname, Object param, Object object) {
-		try {
-			Class id = object.getClass();
-			String fieldAsMethod = ReflectionHelper.prepareMethodNameSet(fieldname);
-			Method setter = id.getMethod(fieldAsMethod, new Class[] { param.getClass() });
-			// log.debug("Trying to Set :"+param)
-			setter.invoke(object, new Object[] { param });
-		} catch (Throwable e) {
-			log.error("Field name '" + fieldname + "' does not match internal model attribute, or parameters are wrong");
-			// e.printStackTrace();
-			// System.exit(1);
-
-		}
-	}
-
-}
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/MUAEngine.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/MUAEngine.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/MUAEngine.java	(revision 668)
@@ -37,10 +37,11 @@
 import uk.ac.cardiff.raptor.event.expansion.AttributeAssociationEngine;
 import uk.ac.cardiff.raptor.remoting.client.EventReleaseClient;
+import uk.ac.cardiff.raptor.runtimeutils.ReflectionHelper;
+import uk.ac.cardiff.raptor.store.EntryHandler;
 import uk.ac.cardiff.raptormua.engine.statistics.Statistic;
 import uk.ac.cardiff.raptormua.engine.statistics.StatisticsHandler;
 import uk.ac.cardiff.raptormua.engine.statistics.StatisticsPostProcessor;
-import uk.ac.cardiff.raptormua.model.EntryHandler;
 import uk.ac.cardiff.raptormua.model.Users;
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
+
 
 /**
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsPreProcessor.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsPreProcessor.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsPreProcessor.java	(revision 668)
@@ -23,6 +23,6 @@
 
 import uk.ac.cardiff.model.event.Event;
+import uk.ac.cardiff.raptor.store.EntryHandler;
 import uk.ac.cardiff.raptormua.exceptions.PreprocessorException;
-import uk.ac.cardiff.raptormua.model.EntryHandler;
 
 /**
@@ -36,5 +36,5 @@
 	 * @throws PreprocessorException
 	 */
-	void preProcess(EntryHandler entryHandler) throws PreprocessorException;
+	public void preProcess(EntryHandler entryHandler) throws PreprocessorException;
 
 
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/Statistic.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/Statistic.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/Statistic.java	(revision 668)
@@ -36,4 +36,5 @@
 import uk.ac.cardiff.model.wsmodel.MethodParameter;
 import uk.ac.cardiff.model.wsmodel.StatisticParameters;
+import uk.ac.cardiff.raptor.store.EntryHandler;
 import uk.ac.cardiff.raptormua.engine.statistics.records.Bucket;
 import uk.ac.cardiff.raptormua.engine.statistics.records.Group;
@@ -42,5 +43,4 @@
 import uk.ac.cardiff.raptormua.exceptions.PreprocessorException;
 import uk.ac.cardiff.raptormua.exceptions.StatisticalUnitException;
-import uk.ac.cardiff.raptormua.model.EntryHandler;
 import uk.ac.cardiff.raptormua.runtimeutils.EntryClone;
 
@@ -51,5 +51,6 @@
 public abstract class Statistic {
 
-	static Logger log = LoggerFactory.getLogger(Statistic.class);
+	/** Class logger */
+	private final Logger log = LoggerFactory.getLogger(Statistic.class);
 
 	private EntryHandler entryHandler;
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsHandler.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsHandler.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/StatisticsHandler.java	(revision 668)
@@ -32,5 +32,5 @@
 import uk.ac.cardiff.model.wsmodel.MethodParameter;
 import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation;
-import uk.ac.cardiff.raptormua.model.EntryHandler;
+import uk.ac.cardiff.raptor.store.EntryHandler;
 
 /**
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByCountDistinct.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByCountDistinct.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByCountDistinct.java	(revision 668)
@@ -11,13 +11,14 @@
 import uk.ac.cardiff.model.wsmodel.StatisticParameters;
 import uk.ac.cardiff.model.wsmodel.MethodParameter.ParameterType;
+import uk.ac.cardiff.raptor.runtimeutils.ReflectionHelper;
 import uk.ac.cardiff.raptormua.engine.statistics.ObservationSeries;
 import uk.ac.cardiff.raptormua.engine.statistics.Statistic;
 import uk.ac.cardiff.raptormua.engine.statistics.records.Group;
 import uk.ac.cardiff.raptormua.exceptions.StatisticalUnitException;
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
 
 public class GroupByCountDistinct extends Statistic{
 	
-	static Logger log = LoggerFactory.getLogger(GroupByCountDistinct.class);
+	/** Class logger */
+	private final Logger log = LoggerFactory.getLogger(GroupByCountDistinct.class);
 	
 	public Boolean performStatistic(ArrayList<MethodParameter> methodParams, String sqlWhere) throws StatisticalUnitException {
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupBy.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupBy.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupBy.java	(revision 668)
@@ -11,13 +11,14 @@
 import uk.ac.cardiff.model.wsmodel.StatisticParameters;
 import uk.ac.cardiff.model.wsmodel.MethodParameter.ParameterType;
+import uk.ac.cardiff.raptor.runtimeutils.ReflectionHelper;
 import uk.ac.cardiff.raptormua.engine.statistics.ObservationSeries;
 import uk.ac.cardiff.raptormua.engine.statistics.Statistic;
 import uk.ac.cardiff.raptormua.engine.statistics.records.Group;
 import uk.ac.cardiff.raptormua.exceptions.StatisticalUnitException;
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
 
 public class GroupBy extends Statistic{
 	
-	static Logger log = LoggerFactory.getLogger(GroupByCountDistinct.class);
+	/** Class logger */
+	private final Logger log = LoggerFactory.getLogger(GroupByCountDistinct.class);
 
 	/**
@@ -32,5 +33,5 @@
 	 *
 	 * @param groupByField
-	 * @return
+	 * @return true if the statistic succeeds successfully
 	 * @throws StatisticalUnitException
 	 */
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByFrequency.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByFrequency.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/GroupByFrequency.java	(revision 668)
@@ -11,13 +11,15 @@
 import uk.ac.cardiff.model.wsmodel.StatisticParameters;
 import uk.ac.cardiff.model.wsmodel.MethodParameter.ParameterType;
+import uk.ac.cardiff.raptor.runtimeutils.ReflectionHelper;
 import uk.ac.cardiff.raptormua.engine.statistics.ObservationSeries;
 import uk.ac.cardiff.raptormua.engine.statistics.Statistic;
 import uk.ac.cardiff.raptormua.engine.statistics.records.Group;
 import uk.ac.cardiff.raptormua.exceptions.StatisticalUnitException;
-import uk.ac.cardiff.raptormua.runtimeutils.ReflectionHelper;
+
 
 public class GroupByFrequency extends Statistic{
 
-	static Logger log = LoggerFactory.getLogger(GroupByFrequency.class);
+	/** Class logger */
+	private final Logger log = LoggerFactory.getLogger(GroupByFrequency.class);
 
 
Index: /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/CountEntry.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/CountEntry.java	(revision 667)
+++ /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/functions/CountEntry.java	(revision 668)
@@ -17,5 +17,6 @@
 public class CountEntry extends Statistic{
 
-	static Logger log = LoggerFactory.getLogger(CountEntry.class);
+	/** Class logger */
+	private final Logger log = LoggerFactory.getLogger(CountEntry.class);
 
 	public Boolean performStatistic(ArrayList<MethodParameter> methodParams, String sqlWhere) throws StatisticalUnitException {
Index: ptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/SessionLinker.java
===================================================================
--- /raptor-mua/trunk/src/main/java/uk/ac/cardiff/raptormua/engine/statistics/SessionLinker.java	(revision 667)
+++ 	(revision )
@@ -1,48 +1,0 @@
-/**
- * Copyright (C) 2010 Cardiff University, Wales <smartp@cf.ac.uk>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *         http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- *
- */
-package uk.ac.cardiff.raptormua.engine.statistics;
-
-import java.util.List;
-import java.util.Set;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import uk.ac.cardiff.model.event.Event;
-import uk.ac.cardiff.raptormua.exceptions.PreprocessorException;
-import uk.ac.cardiff.raptormua.model.EntryHandler;
-
-/**
- * @author philsmart
- *
- */
-public class SessionLinker implements StatisticsPreProcessor{
-
-	static Logger log = LoggerFactory.getLogger(SessionLinker.class);
-	/* (non-Javadoc)
-	 * @see uk.ac.cardiff.raptormua.engine.statistics.StatisticsPreProcessing#preProcess(java.util.List)
-	 */
-	@Override
-	public void preProcess(EntryHandler entryHandler) throws PreprocessorException{
-	    log.info("Preprocessing with "+this.getClass());
-	}
-
-
-
-}
Index: /raptor-mua/trunk/src/main/config/statistical-units.xml
===================================================================
--- /raptor-mua/trunk/src/main/config/statistical-units.xml	(revision 667)
+++ /raptor-mua/trunk/src/main/config/statistical-units.xml	(revision 668)
@@ -296,6 +296,4 @@
 	<!--  Support statistical workflows -->
 
-	<bean id="SessionLinker" class = "uk.ac.cardiff.raptormua.engine.statistics.SessionLinker"/>
-
 	<bean id="percentagePost" class = "uk.ac.cardiff.raptormua.engine.statistics.PercentagePostProcessor">
 	</bean>
Index: /raptor-mua/trunk/src/main/config/mua-core.xml
===================================================================
--- /raptor-mua/trunk/src/main/config/mua-core.xml	(revision 667)
+++ /raptor-mua/trunk/src/main/config/mua-core.xml	(revision 668)
@@ -125,5 +125,5 @@
 
 	<!-- Create the entry handler -->
-	<bean name="persistantEntryHandler" class="uk.ac.cardiff.raptormua.model.PersistantEntryHandler">
+	<bean name="persistantEntryHandler" class="uk.ac.cardiff.raptor.store.impl.PersistantEntryHandler">
 		<constructor-arg index="0"><ref bean="dataConnectionImpl"></ref></constructor-arg>
 	</bean>
Index: /raptor-mua/trunk/src/main/config/dao-beans.xml
===================================================================
--- /raptor-mua/trunk/src/main/config/dao-beans.xml	(revision 667)
+++ /raptor-mua/trunk/src/main/config/dao-beans.xml	(revision 668)
@@ -91,5 +91,5 @@
 
 
-	<bean name="dataConnectionImpl" class="uk.ac.cardiff.raptormua.dao.MUADataConnectionImpl">
+	<bean name="dataConnectionImpl" class="uk.ac.cardiff.raptor.store.dao.MUADataConnectionImpl">
 		<property name="sessionFactory" ref="muaSessionFactory" />
 	</bean>
Index: /raptor-mua/trunk/pom.xml
===================================================================
--- /raptor-mua/trunk/pom.xml	(revision 667)
+++ /raptor-mua/trunk/pom.xml	(revision 668)
@@ -282,9 +282,5 @@
 
 
-		<dependency>
-			<groupId>hibernate</groupId>
-			<artifactId>hibernate</artifactId>
-			<version>3.1rc2</version>
-		</dependency>
+
 
 
