51 std::string NoDescription =
"None";
52 std::string NoName =
"None";
53 this->
SetField(
"Description", NoDescription);
61 vtkMySQLDatabase *DatabaseConnector)
71 vtkMySQLDatabase *iDatabaseConnector, std::string & ioName)
abstract class manages a map with keys matching fields of a gofiguredatabase table and values of the ...
std::string m_TableIDName
virtual int DoesThisNameAlreadyExists(vtkMySQLDatabase *iDatabaseConnector)
check if the name already exists in the database, if yes, return the corresponding ID...
virtual void InitializeMap()
virtual pure. initialize all the values of the map
std::string ReturnOnlyOneValue(vtkMySQLDatabase *DatabaseConnector, const std::string &TableName, const std::string &ColumnName, const std::string &field, const std::string &value)
SELECT ColunmName FROM TableName WHERE field=value limit 1.
int FindOneID(vtkMySQLDatabase *DatabaseConnector, const std::string &TableName, const std::string &ColumnName, const std::string &field, const std::string &value)
SELECT ColumnName FROM TableName WHERE field = value.
virtual int DoesThisEntityAlreadyExistsAndReturnName(vtkMySQLDatabase *iDatabaseConnector, std::string &ioName)
check if the entity already exists in the database based on its own uniqueness definition, return the ID of the entity already exiting or -1 if not yet created and change the ioName with the name of the existing entity
void SetField(const std::string &key, const T &value)
convert the value into a string and assign it to the key in the map
virtual int DoesThisEntityAlreadyExists(vtkMySQLDatabase *iDatabaseConnector)=0
Pure Virtual :check if the entity already exists in the database based on its own uniqueness definiti...
std::string GetMapValue(const std::string &key)
return the value for the field map[key] after having removed the " at the beginning and at the end of...