34 #ifndef __GoDBNameDescRow_h
35 #define __GoDBNameDescRow_h
39 #include "vtkMySQLDatabase.h"
61 virtual int SaveInDB(vtkMySQLDatabase *iDatabaseConnector) = 0;
70 virtual int DoesThisEntityAlreadyExists(
71 vtkMySQLDatabase *iDatabaseConnector) = 0;
83 virtual int DoesThisEntityAlreadyExistsAndReturnName(
84 vtkMySQLDatabase *iDatabaseConnector, std::string & ioName);
93 virtual int DoesThisNameAlreadyExists(vtkMySQLDatabase *iDatabaseConnector);
106 template<
typename T >
109 int NewEntityID = iNewEntity.DoesThisEntityAlreadyExists(iDatabaseConnector);
111 if ( NewEntityID == -1 )
114 AddOnlyOneNewObjectInTable< T >(iDatabaseConnector,
115 iNewEntity.m_TableName,
116 iNewEntity, iNewEntity.m_TableIDName);
abstract class manages a map with keys matching fields of a gofiguredatabase table and values of the ...
Abstract. manages the map with the keys matching the fields for the DBtable containing a name and des...
int SaveInDBTemplate(vtkMySQLDatabase *iDatabaseConnector, T iNewEntity)
check if the GoDBNameDescRow already exists, if yes, return the ID of the existing one...
virtual void InitializeMap()=0
virtual pure. initialize all the values of the map