public class ExperimenterSQLHandle extends java.lang.Object implements IExperimentDatabaseHandle
| Constructor and Description |
|---|
ExperimenterSQLHandle(IDatabaseConfig config) |
ExperimenterSQLHandle(ai.libs.jaicore.basic.SQLAdapter adapter,
java.lang.String tablename) |
| Modifier and Type | Method and Description |
|---|---|
ExperimentDBEntry |
createAndGetExperiment(Experiment experiment)
* Creates a new experiment entry and returns it.
|
ExperimentDBEntry |
createAndGetExperiment(java.util.Map<java.lang.String,java.lang.String> values) |
void |
finishExperiment(ExperimentDBEntry expEntry)
Signals that an experiment has been finished successfully.
|
void |
finishExperiment(ExperimentDBEntry expEntry,
java.lang.Throwable error)
Signals that an experiment has failed with an exception.
|
java.util.Collection<ExperimentDBEntry> |
getConductedExperiments()
Returns a list of all experiments contained in the database.
|
void |
setup(IExperimentSetConfig config)
Prepares everything so that upcoming calls for create and update will be managed according to the specified configuration.
|
void |
updateExperiment(ExperimentDBEntry exp,
java.util.Map<java.lang.String,? extends java.lang.Object> values)
Updates non-keyfield values of the experiment.
|
public ExperimenterSQLHandle(ai.libs.jaicore.basic.SQLAdapter adapter,
java.lang.String tablename)
public ExperimenterSQLHandle(IDatabaseConfig config)
public void setup(IExperimentSetConfig config) throws ExperimentDBInteractionFailedException
IExperimentDatabaseHandlesetup in interface IExperimentDatabaseHandleconfig - Description of the experiment setupExperimentDBInteractionFailedExceptionpublic java.util.Collection<ExperimentDBEntry> getConductedExperiments() throws ExperimentDBInteractionFailedException
IExperimentDatabaseHandlegetConductedExperiments in interface IExperimentDatabaseHandleExperimentDBInteractionFailedExceptionpublic ExperimentDBEntry createAndGetExperiment(java.util.Map<java.lang.String,java.lang.String> values) throws ExperimentDBInteractionFailedException
public ExperimentDBEntry createAndGetExperiment(Experiment experiment) throws ExperimentDBInteractionFailedException
IExperimentDatabaseHandlecreateAndGetExperiment in interface IExperimentDatabaseHandleExperimentDBInteractionFailedExceptionpublic void updateExperiment(ExperimentDBEntry exp, java.util.Map<java.lang.String,? extends java.lang.Object> values) throws ExperimentUpdateFailedException
IExperimentDatabaseHandleupdateExperiment in interface IExperimentDatabaseHandleexp - The experiment entry in the databasevalues - A key-value store where keys are names of result fields. The values will be associated to each key in the database.ExperimentUpdateFailedExceptionpublic void finishExperiment(ExperimentDBEntry expEntry, java.lang.Throwable error) throws ExperimentDBInteractionFailedException
IExperimentDatabaseHandlefinishExperiment in interface IExperimentDatabaseHandleExperimentDBInteractionFailedExceptionpublic void finishExperiment(ExperimentDBEntry expEntry) throws ExperimentDBInteractionFailedException
IExperimentDatabaseHandlefinishExperiment in interface IExperimentDatabaseHandleExperimentDBInteractionFailedException