50 this->
m_MapRow[
"BookmarkID"] = std::string(
"0" );
52 this->
m_MapRow[
"ImagingSessionID"] = std::string(
"0" );
53 this->
m_MapRow[
"CoordID"] = std::string(
"0" );
56 std::string NoDescription =
"None";
57 this->
SetField(
"Description", NoDescription);
64 vtkMySQLDatabase *DatabaseConnector)
66 std::vector< FieldWithValue > Conditions;
69 return FindOneID(DatabaseConnector,
"bookmark",
"BookmarkID", Conditions);
76 vtkMySQLDatabase *iDatabaseConnector)
78 std::vector< FieldWithValue > Conditions;
81 return FindOneID(iDatabaseConnector,
"bookmark",
"BookmarkID", Conditions);
89 return this->SaveInDBTemplate< GoDBBookmarkRow >(iDatabaseConnector, *
this);
std::string m_TableIDName
virtual int DoesThisEntityAlreadyExists(vtkMySQLDatabase *DatabaseConnector)
Pure Virtual :check if the entity already exists in the database based on its own uniqueness definiti...
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 void InitializeMap()
virtual pure. initialize all the values of the map
void SetField(const std::string &key, const T &value)
convert the value into a string and assign it to the key in the map
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 ...
virtual int DoesThisNameAlreadyExists(vtkMySQLDatabase *DatabaseConnector)
check if the name already exists in the database, if yes, return the corresponding ID...
virtual int SaveInDB(vtkMySQLDatabase *DatabaseConnector)
Pure Virtual :check if the entity already exists in the DB, if yes, return the existing ID...