Package es.bsc.dataclay.logic.datasetmgr
Class DataSetManagerDB
- java.lang.Object
-
- es.bsc.dataclay.logic.datasetmgr.DataSetManagerDB
-
public final class DataSetManagerDB extends Object
Data base connection.
-
-
Constructor Summary
Constructors Constructor Description DataSetManagerDB(SQLiteDataSource dataSource)
MetaDataServiceDB constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close DB.void
createTables()
Create tables of MDS.void
deleteDataSetByID(DataSetID dataSetID)
Delete by IDvoid
dropTables()
Delete the tables of MDS.DataSet
getDataSetByID(DataSetID datasetID)
Get by IDDataSet
getDataSetByName(String name)
Get by nameList<DataSet>
getDataSetsWithProvider(AccountID providerAccountID)
Get datasets containing providerSet<DataSet>
getPublicDataSets()
Get public datasetsvoid
store(DataSet dataSet)
Store dataSet into database
-
-
-
Constructor Detail
-
DataSetManagerDB
public DataSetManagerDB(SQLiteDataSource dataSource)
MetaDataServiceDB constructor.- Parameters:
dataSource
- Name of the LM service managing.
-
-
Method Detail
-
createTables
public void createTables()
Create tables of MDS.
-
dropTables
public void dropTables()
Delete the tables of MDS. Just the other way around of createTables --much simpler.
-
store
public void store(DataSet dataSet)
Store dataSet into database- Parameters:
dataSet
- dataSet
-
getDataSetByID
public DataSet getDataSetByID(DataSetID datasetID)
Get by ID- Parameters:
datasetID
- ID of object- Returns:
- The object
- Throws:
SQLException
- if not found
-
deleteDataSetByID
public void deleteDataSetByID(DataSetID dataSetID)
Delete by ID- Parameters:
dataSetID
- ID of object
-
getDataSetsWithProvider
public List<DataSet> getDataSetsWithProvider(AccountID providerAccountID)
Get datasets containing provider- Parameters:
providerAccountID
- Account ID- Returns:
- The DataSets
-
getDataSetByName
public DataSet getDataSetByName(String name)
Get by name- Parameters:
name
- the name- Returns:
- The object
- Throws:
SQLException
- if not found
-
getPublicDataSets
public Set<DataSet> getPublicDataSets()
Get public datasets- Returns:
- Set of datasets
-
close
public void close()
Close DB.
-
-