/**
 * Copyright © 2011-2013 EMBL - European Bioinformatics Institute
 * 
 * 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.ebi.phenotype.dao;

/**
 * experimental observation manager interface
 * 
 * @author Gautier Koscielny (EMBL-EBI) <koscieln@ebi.ac.uk>
 * @since May 2012
 */

import java.util.List;

import uk.ac.ebi.phenotype.pojo.Datasource;
import uk.ac.ebi.phenotype.pojo.Experiment;
import uk.ac.ebi.phenotype.pojo.Observation;
import uk.ac.ebi.phenotype.pojo.Organisation;

public interface ObservationDAO {

	public List<Observation> getObservationsBySampleIdAndParameterStableId(int sampleId, String parameterStableId);
	
	public void saveExperiment(Experiment experiment);
	public void saveObservation(Observation observation);
	
	public int deleteAllExperimentsByOrganisationAndDatasource(Organisation organisation, Datasource datasource);
	public int deleteAllCategoricalObservationsByOrganisationAndDatasource(Organisation organisation, Datasource datasource);
	public int deleteAllTimeSeriesObservationsByOrganisationAndDatasource(Organisation organisation, Datasource datasource);
	public int deleteAllUnidimensionalObservationsByOrganisationAndDatasource(Organisation organisation, Datasource datasource);
}

@@ -826,16 +826,66 @@
 .List;%0A%0A
+import uk.ac.ebi.phenotype.pojo.BiologicalSample;%0A
 import u
@@ -920,16 +920,16 @@
 source;%0A
-
 import u
@@ -1009,16 +1009,65 @@
 vation;%0A
+import uk.ac.ebi.phenotype.pojo.ObservationType;%0A
 import u
@@ -1103,16 +1103,59 @@
 isation;
+%0Aimport uk.ac.ebi.phenotype.pojo.Parameter;
 %0A%0Apublic
@@ -1350,16 +1350,16 @@
 iment);%0A
-
 %09public 
@@ -1403,24 +1403,559 @@
 rvation);%0A%09%0A
+%09public Observation createSimpleObservation(%0A%09%09%09ObservationType observationType, %0A%09%09%09String simpleValue,%0A%09%09%09Parameter parameter, %0A%09%09%09BiologicalSample sample,%0A%09%09%09int populationId,%0A%09%09%09Datasource datasource,%0A%09%09%09Experiment experiment);%0A%09%0A%09public Observation createObservation(%0A%09%09%09ObservationType observationType, %0A%09%09%09String firstDimensionValue, %0A%09%09%09String secondDimensionValue,%0A%09%09%09String secondDimensionUnit,%0A%09%09%09Parameter parameter, %0A%09%09%09BiologicalSample sample, %0A%09%09%09int populationId,%0A%09%09%09Datasource datasource,%0A%09%09%09Experiment experiment);%0A%09%0A
 %09public int 

Save observations with a population id (to group measurements from cohors together)