49 this->
m_MapRow[
"authorID"] = std::string(
"0" );
51 this->
m_MapRow[
"FirstName"] = std::string(
"0" );
52 this->
m_MapRow[
"MiddleName"] =
"<none>";
64 AuthorID = AddOnlyOneNewObjectInTable< GoDBAuthorRow >(
65 DatabaseConnector,
"author", *
this,
"authorID");
74 vtkMySQLDatabase *DatabaseConnector)
76 std::vector< FieldWithValue > Conditions;
80 return FindOneID(DatabaseConnector,
"author",
"authorID", Conditions);
virtual void InitializeMap()
virtual pure. initialize all the values of the map
int DoesThisAuthorAlreadyExists(vtkMySQLDatabase *DatabaseConnector)
check if the author already exists in the database, if yes, return the corresponding ID...
abstract class manages a map with keys matching fields of a gofiguredatabase table and values of the ...
std::string m_TableIDName
int SaveInDB(vtkMySQLDatabase *DatabaseConnector)
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.
void AddConditions(const std::string &iNameOfField, std::vector< FieldWithValue > &ioFieldWithValue)
add as an element of ioFieldWithValue the name and value of the map with the key iNameOfField ...