#include <OpenMS/FORMAT/DB/DBAdapter.h>
It can be used to create objects from the DB or store them in the DB.
Public Member Functions | |
DBAdapter (DBConnection &db_con) | |
Constructor. | |
~DBAdapter () | |
Destructor. | |
template<class ExperimentType> | |
void | storeExperiment (ExperimentType &exp) |
Stores a MSExperiment. | |
template<class ExperimentType> | |
void | loadExperiment (UID id, ExperimentType &exp) |
Reads a MSExperiment. | |
template<class SpectrumType> | |
void | loadSpectrum (UID id, SpectrumType &spec) |
Reads a MSSpectrum. | |
PeakFileOptions & | getOptions () |
Mutable access to the options for loading/storing. | |
const PeakFileOptions & | getOptions () const |
Non-mutable access to the options for loading/storing. | |
bool | checkDBVersion (bool warning) |
Returns true if the DB is up-to-date (Checks the version in ADMIN_Version table). | |
void | createDB () |
Deletes all tables in the database and creates a new OpenMS database. | |
Private Member Functions | |
DBAdapter () | |
Not implemented. | |
UID | storeMetaInfo_ (const String &parent_table, UID parent_id, const MetaInfoInterface &info) |
Stores, updates or deletes MetaInfo data. | |
void | loadMetaInfo_ (UID id, MetaInfoInterface &info) |
Loads MetaInfo data from database. | |
void | deleteMetaInfo_ (const String &parent_table, const String &condition) |
Conditionally deletes MetaInfo data from database. | |
UID | storeFile_ (const String &parent_table, UID parent_id, const SourceFile &file) |
Stores, updates or deletes file information. | |
void | loadFile_ (UID id, SourceFile &file) |
Loads file information. | |
UID | storeSample_ (const Sample &sample, UID exp_id, UID parent_id) |
Stores, updates or deletes sample information. | |
void | loadSample_ (UID id, Sample &sample) |
Loads sample information. | |
Private Attributes | |
DBConnection & | db_con_ |
Reference to the DB connection handed over in the constructor. | |
PeakFileOptions | options_ |
DBAdapter | ( | DBConnection & | db_con | ) |
Constructor.
~DBAdapter | ( | ) |
Destructor.
DBAdapter | ( | ) | [private] |
Not implemented.
void storeExperiment | ( | ExperimentType & | exp | ) | [inline] |
Stores a MSExperiment.
void loadExperiment | ( | UID | id, | |
ExperimentType & | exp | |||
) | [inline] |
Reads a MSExperiment.
void loadSpectrum | ( | UID | id, | |
SpectrumType & | spec | |||
) | [inline] |
Reads a MSSpectrum.
PeakFileOptions& getOptions | ( | ) |
Mutable access to the options for loading/storing.
const PeakFileOptions& getOptions | ( | ) | const |
Non-mutable access to the options for loading/storing.
bool checkDBVersion | ( | bool | warning | ) |
Returns true if the DB is up-to-date (Checks the version in ADMIN_Version table).
warning | if this is set, a warning is issued to stderr if the db is not up-to-date. |
void createDB | ( | ) |
Deletes all tables in the database and creates a new OpenMS database.
UID storeMetaInfo_ | ( | const String & | parent_table, | |
UID | parent_id, | |||
const MetaInfoInterface & | info | |||
) | [private] |
void loadMetaInfo_ | ( | UID | id, | |
MetaInfoInterface & | info | |||
) | [private] |
Loads MetaInfo data from database.
Conditionally deletes MetaInfo data from database.
UID storeFile_ | ( | const String & | parent_table, | |
UID | parent_id, | |||
const SourceFile & | file | |||
) | [private] |
Stores, updates or deletes file information.
void loadFile_ | ( | UID | id, | |
SourceFile & | file | |||
) | [private] |
Loads file information.
Stores, updates or deletes sample information.
DBConnection& db_con_ [private] |
Reference to the DB connection handed over in the constructor.
PeakFileOptions options_ [private] |
Generated Tue Apr 1 15:36:44 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |