Class InterfaceManagerDB
- java.lang.Object
-
- es.bsc.dataclay.logic.interfacemgr.InterfaceManagerDB
-
public final class InterfaceManagerDB extends Object
Data base connection.
-
-
Constructor Summary
Constructors Constructor Description InterfaceManagerDB(SQLiteDataSource dataSource)
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
deleteInterface(InterfaceID id)
Deletevoid
dropTables()
Delete the tables of MDS.boolean
existsObjectByID(InterfaceID dataClayID)
check if iface exists.Interface
getInterfaceByID(InterfaceID ifaceID)
Get interface by IDInterface
getInterfaceByNames(String providerAccount, String namespace, String classname, Set<String> propertiesInIface, Set<String> operationsSignatureInIface)
Get interface by namesList<Interface>
getInterfacesOfClass(NamespaceID namespaceID, MetaClassID classID)
Get interfaces of classvoid
store(Interface iface)
Store into database
-
-
-
Constructor Detail
-
InterfaceManagerDB
public InterfaceManagerDB(SQLiteDataSource dataSource)
Constructor.
-
-
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(Interface iface)
Store into database- Parameters:
iface
- Interface to store
-
getInterfaceByID
public Interface getInterfaceByID(InterfaceID ifaceID)
Get interface by ID- Parameters:
ifaceID
- ID of the interface- Returns:
- The interface
-
deleteInterface
public void deleteInterface(InterfaceID id)
Delete- Parameters:
id
- ID of object to delete
-
getInterfacesOfClass
public List<Interface> getInterfacesOfClass(NamespaceID namespaceID, MetaClassID classID)
Get interfaces of class- Parameters:
namespaceID
- Namespace IDclassID
- class ID- Returns:
- The classes
-
getInterfaceByNames
public Interface getInterfaceByNames(String providerAccount, String namespace, String classname, Set<String> propertiesInIface, Set<String> operationsSignatureInIface)
Get interface by names- Parameters:
providerAccount
- Name of the account providing the interfacenamespace
- Namespace of the class of the interfaceclassname
- Classname of the class of the interfacepropertiesInIface
- Properties in interfaceoperationsSignatureInIface
- Operations in interface- Returns:
- The interface
-
close
public void close()
Close DB.
-
existsObjectByID
public boolean existsObjectByID(InterfaceID dataClayID)
check if iface exists.- Parameters:
dataClayID
- ID of interface- Returns:
- TRUE if exists.
-
-