Commit 2590a953 authored by Steven Murray's avatar Steven Murray
Browse files

Merged the trunk into this branch.

parents 0e8ca8a5 71b05bc7
......@@ -446,6 +446,8 @@ InstallNonExecFile(metrics/Counter.hpp,$(BUILDHEADERSDIRHPP)/metrics,644)
InstallNonExecFile(metrics/Histogram.hpp,$(BUILDHEADERSDIRHPP)/metrics,644)
InstallNonExecFile(metrics/MetricsCollector.hpp,$(BUILDHEADERSDIRHPP)/metrics,644)
InstallNonExecFile(query/DiskPoolQueryType.hpp,$(BUILDHEADERSDIRHPP)/query,644)
InstallNonExecFile(rh/FileQryResponse.hpp,$(BUILDHEADERSDIRHPP)/rh,644)
InstallNonExecFile(server/BaseDaemon.hpp,$(BUILDHEADERSDIRHPP)/server,644)
......
......@@ -149,13 +149,13 @@ void castor::io::AbstractTCPSocket::readBuffer(const unsigned int magic,
long bytes = strtol(value, 0, 10);
// Check that the string converted to an integer is valid
if (((bytes == 0) && (errno == ERANGE)) || (bytes > INT_MAX)) {
castor::exception::Exception ex(EINVAL);
ex.getMessage() << "Invalid CLIENT/MAX_NETDATA_SIZE option, " << strerror(ERANGE);
throw ex;
castor::exception::Exception ex(EINVAL);
ex.getMessage() << "Invalid CLIENT/MAX_NETDATA_SIZE option, " << strerror(ERANGE);
throw ex;
} else if (bytes < MAX_NETDATA_SIZE) {
castor::exception::Exception ex(EINVAL);
ex.getMessage() << "Invalid CLIENT/MAX_NETDATA_SIZE option, value too small";
throw ex;
castor::exception::Exception ex(EINVAL);
ex.getMessage() << "Invalid CLIENT/MAX_NETDATA_SIZE option, value too small";
throw ex;
}
m_maxNetDataSize = (int)bytes;
} else {
......
......@@ -33,3 +33,8 @@ CLIENTEXEMANPAGE(stager_addprivilege)
CLIENTEXEMANPAGE(stager_removeprivilege)
CLIENTEXEMANPAGE(stager_listprivileges)
EXEMANPAGE(stager_abort)
# Required by castor-srmv2
BUILDHEADERSDIRCLIENT=$(TOPINCLUDE)/castor/client/src/stager
InstallNonExecFile(stager_client_api_query.hpp,$(BUILDHEADERSDIRCLIENT),644)
......@@ -211,7 +211,7 @@ void CCClassWriter::writeAttributeMethods(QPtrList <UMLAttribute>& attribs,
at=attribs.next()) {
QString methodBaseName = at->getName();
methodBaseName.stripWhiteSpace();
if (m_ignoreButForDB.find(methodBaseName) == m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
writeSingleAttributeAccessorMethods(at->getTypeName(),
methodBaseName,
Uml::chg_Changeable,
......@@ -234,7 +234,7 @@ void CCClassWriter::writeAssociationMethods (QPtrList<UMLAssociation> associatio
if (a->getUMLRole(Uml::A)->getObject()->getID() == myID && a->getVisibility(Uml::B) == Uml::Visibility::Public) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
if (m_ignoreButForDB.find(a->getRoleName(Uml::B)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::B) != SQLONLY) {
QString className = a->getObject(Uml::B)->getName();
if (!isEnum(className)) className.append("*");
writeAssociationRoleMethod
......@@ -249,7 +249,7 @@ void CCClassWriter::writeAssociationMethods (QPtrList<UMLAssociation> associatio
if (a->getUMLRole(Uml::B)->getObject()->getID() == myID && a->getVisibility(Uml::A) == Uml::Visibility::Public) {
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
if (m_ignoreButForDB.find(a->getRoleName(Uml::A)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::A) != SQLONLY) {
QString className = a->getObject(Uml::A)->getName();
if (!isEnum(className)) className.append("*");
writeAssociationRoleMethod
......
......@@ -248,7 +248,7 @@ void CHClassWriter::writeAttributeMethods(QPtrList <UMLAttribute>& attribs,
at=attribs.next()) {
QString methodBaseName = at->getName();
methodBaseName.stripWhiteSpace();
if (m_ignoreButForDB.find(methodBaseName) == m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
writeSingleAttributeAccessorMethods(at->getTypeName(),
methodBaseName,
at->getDoc(),
......@@ -273,7 +273,7 @@ void CHClassWriter::writeAssociationMethods (QPtrList<UMLAssociation> associatio
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::B).isEmpty()) {
QString name = a->getObject(Uml::B)->getName();
if (m_ignoreButForDB.find(a->getRoleName(Uml::B)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::B) != SQLONLY) {
if (!isEnum(name)) name.append("*");
writeAssociationRoleMethod
(name,
......@@ -289,7 +289,7 @@ void CHClassWriter::writeAssociationMethods (QPtrList<UMLAssociation> associatio
// only write out IF there is a rolename given
if(!a->getRoleName(Uml::A).isEmpty()) {
QString name = a->getObject(Uml::A)->getName();
if (m_ignoreButForDB.find(a->getRoleName(Uml::A)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::A) != SQLONLY) {
if (!isEnum(name)) name.append("*");
writeAssociationRoleMethod
(name,
......
......@@ -794,6 +794,8 @@ void CppBaseWriter::singleAssocToPairList (UMLAssociation *a,
Assoc* as;
if (ci.id() == a->getUMLRole(Uml::A)->getObject()->getID() ||
ci.allSuperclassIds.contains(a->getUMLRole(Uml::A)->getObject()->getID())) {
// here we hijack the UMLAssociation.documentation (roledoc) field as the stereotype
// of the association, which is later checked against predefined stereotypes.
as = new Assoc(AssocType(parseMulti(a->getMulti(Uml::B)),
parseMulti(a->getMulti(Uml::A)),
parseAssocKind(a->getAssocType(), true)),
......@@ -801,10 +803,12 @@ void CppBaseWriter::singleAssocToPairList (UMLAssociation *a,
a->getObject(Uml::B)->getName(),
a->getObject(Uml::B)->getAbstract(),
a->getObject(Uml::B)->getStereotype()),
a->getRoleDoc(Uml::B),
Member(a->getRoleName(Uml::A),
a->getObject(Uml::A)->getName(),
a->getObject(Uml::A)->getAbstract(),
a->getObject(Uml::A)->getStereotype()));
a->getObject(Uml::A)->getStereotype()),
a->getRoleDoc(Uml::A));
} else {
as = new Assoc(AssocType(parseMulti(a->getMulti(Uml::A)),
parseMulti(a->getMulti(Uml::B)),
......@@ -813,10 +817,12 @@ void CppBaseWriter::singleAssocToPairList (UMLAssociation *a,
a->getObject(Uml::A)->getName(),
a->getObject(Uml::A)->getAbstract(),
a->getObject(Uml::A)->getStereotype()),
a->getRoleDoc(Uml::A),
Member(a->getRoleName(Uml::B),
a->getObject(Uml::B)->getName(),
a->getObject(Uml::B)->getAbstract(),
a->getObject(Uml::B)->getStereotype()));
a->getObject(Uml::B)->getStereotype()),
a->getRoleDoc(Uml::A));
}
list.append(as);
}
......
......@@ -15,6 +15,10 @@
#include "../umlnamespace.h"
#include "../operation.h"
// Predefined stereotypes
static const QString DONOTSTREAM = "DoNotStream";
static const QString SQLONLY = "SqlOnly";
/**
* Base cpp writer.
* Implements functionnalities for including files,
......@@ -333,9 +337,11 @@ class CppBaseWriter : public CppCastorWriter {
struct Assoc {
AssocType type;
Member remotePart;
QString remoteStereotype;
Member localPart;
Assoc(AssocType t, Member rp, Member lp) :
type(t), remotePart(rp), localPart(lp){}
QString localStereotype;
Assoc(AssocType t, Member rp, QString rst, Member lp, QString lst) :
type(t), remotePart(rp), remoteStereotype(rst), localPart(lp), localStereotype(lst) {}
};
/**
......
......@@ -43,14 +43,6 @@ CppCastorWriter::CppCastorWriter(UMLDoc* parent, const char *name) :
// Types to ignore
m_ignoreClasses.insert(QString("IPersistent"));
m_ignoreClasses.insert(QString("IStreamable"));
// Associations and Members to ignore, except for dB stuff
m_ignoreButForDB.insert(QString("lastFileSystemUsed"));
m_ignoreButForDB.insert(QString("lastButOneFileSystemUsed"));
m_ignoreButForDB.insert(QString("lastFileSystemChange"));
m_ignoreButForDB.insert(QString("diskCopySize"));
m_ignoreButForDB.insert(QString("nbCopyAccesses"));
m_ignoreButForDB.insert(QString("gcType"));
m_ignoreButForDB.insert(QString("migrSelectPolicy"));
// List of types still needing a C wrapper. To be reduce and dropped
m_cWrappedTypes.insert(QString("CastorFile"));
m_cWrappedTypes.insert(QString("SetFileGCWeight"));
......
......@@ -65,9 +65,6 @@ class CppCastorWriter : public SimpleCodeGenerator {
*/
UMLClassifier* getDatatype(QString type);
/** The list of associations and members to ignore, except for dB stuff */
std::set<QString> m_ignoreButForDB;
protected:
/**
* Map of castor types with the associated include files
......
......@@ -111,7 +111,7 @@ void CppCppClassWriter::writeConstructorMethods(QTextStream &stream) {
for(UMLAttribute *at = m_classInfo->atpub.first();
0 != at;
at = m_classInfo->atpub.next()) {
if (m_ignoreButForDB.find(at->getName()) == m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
writeInitInConstructor(QString("m_") + at->getName(),
at->getTypeName(), first);
}
......@@ -119,7 +119,7 @@ void CppCppClassWriter::writeConstructorMethods(QTextStream &stream) {
for(UMLAttribute *at = m_classInfo->atprot.first();
0 != at;
at = m_classInfo->atprot.next()) {
if (m_ignoreButForDB.find(at->getName()) == m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
writeInitInConstructor(QString("m_") + at->getName(),
at->getTypeName(), first);
}
......@@ -127,7 +127,7 @@ void CppCppClassWriter::writeConstructorMethods(QTextStream &stream) {
for(UMLAttribute *at = m_classInfo->atpriv.first();
0 != at;
at = m_classInfo->atpriv.next()) {
if (m_ignoreButForDB.find(at->getName()) == m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
writeInitInConstructor(QString("m_") + at->getName(),
at->getTypeName(), first);
}
......@@ -252,7 +252,7 @@ void CppCppClassWriter::writeAssocInitInConstructor (UMLAssociation *a,
m_classInfo->allSuperclassIds.contains(a->getUMLRole(Uml::A)->getObject()->getID())) {
if (a->getRoleName(Uml::B) != "") {
if (parseMulti(a->getMulti(Uml::B)) == MULT_ONE) {
if (m_ignoreButForDB.find(a->getRoleName(Uml::B)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::B) != SQLONLY) {
QString className = a->getObject(Uml::B)->getName();
if (!isEnum(className)) className.append("*");
writeInitInConstructor (QString("m_") + a->getRoleName(Uml::B),
......@@ -264,7 +264,7 @@ void CppCppClassWriter::writeAssocInitInConstructor (UMLAssociation *a,
} else {
if (a->getRoleName(Uml::A) != "") {
if (parseMulti(a->getMulti(Uml::A)) == MULT_ONE) {
if (m_ignoreButForDB.find(a->getRoleName(Uml::A)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::A) != SQLONLY) {
QString className = a->getObject(Uml::A)->getName();
if (!isEnum(className)) className.append("*");
writeInitInConstructor (QString("m_") + a->getRoleName(Uml::A),
......@@ -365,7 +365,7 @@ void CppCppClassWriter::writeAssocDeleteInDestructor(UMLAssociation *a) {
if (m_classInfo->id() == a->getUMLRole(Uml::A)->getObject()->getID() ||
m_classInfo->allSuperclassIds.contains(a->getUMLRole(Uml::A)->getObject()->getID())) {
if (a->getRoleName(Uml::B) != "") {
if (m_ignoreButForDB.find(a->getRoleName(Uml::B)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::B) != SQLONLY) {
UMLClassifier* cl = dynamic_cast<UMLClassifier*>(a->getObject(Uml::B));
if (0 == cl || !isEnum(cl)) {
fixTypeName(a->getObject(Uml::B)->getName(),
......@@ -380,7 +380,7 @@ void CppCppClassWriter::writeAssocDeleteInDestructor(UMLAssociation *a) {
}
} else {
if (a->getRoleName(Uml::A) != "") {
if (m_ignoreButForDB.find(a->getRoleName(Uml::A)) == m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::A) != SQLONLY) {
UMLClassifier* cl = dynamic_cast<UMLClassifier*>(a->getObject(Uml::A));
if (0 == cl || !isEnum(cl)) {
fixTypeName(a->getObject(Uml::A)->getName(),
......@@ -506,7 +506,7 @@ void CppCppClassWriter::writeFullPrint(CppBaseWriter* obj,
for(UMLAttribute *at = members->first();
0 != at;
at = members->next()) {
if (obj->m_ignoreButForDB.find(at->getName()) == obj->m_ignoreButForDB.end()) {
if (at->getStereotype() != SQLONLY) {
if (at->getName() == "content") {
// This probably means we deal with a castor type
// Then try to get the dedicated
......@@ -550,7 +550,7 @@ void CppCppClassWriter::writeAssocPrint(UMLAssociation* a,
if (obj->classInfo()->id() == a->getUMLRole(Uml::A)->getObject()->getID() ||
obj->classInfo()->allSuperclassIds.contains(a->getUMLRole(Uml::A)->getObject()->getID())) {
if (a->getRoleName(Uml::B) != "") {
if (obj->m_ignoreButForDB.find(a->getRoleName(Uml::B)) == obj->m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::B) != SQLONLY) {
Multiplicity multiB = obj->parseMulti(a->getMulti(Uml::B));
switch (multiB) {
case MULT_ONE:
......@@ -587,7 +587,7 @@ void CppCppClassWriter::writeAssocPrint(UMLAssociation* a,
}
} else {
if (a->getRoleName(Uml::A) != "") {
if (obj->m_ignoreButForDB.find(a->getRoleName(Uml::A)) == obj->m_ignoreButForDB.end()) {
if (a->getRoleDoc(Uml::A) != SQLONLY) {
Multiplicity multiA = obj->parseMulti(a->getMulti(Uml::A));
switch (multiA) {
case MULT_ONE:
......
......@@ -228,7 +228,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (!first) *m_stream << ", ";
*m_stream << mem->name;
first = false;
......@@ -239,7 +239,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
// One to One associations
......@@ -254,7 +254,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (!first) *m_stream << ",";
first = false;
if (mem->name == "id") {
......@@ -271,7 +271,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
if (!first) *m_stream << ",";
......@@ -305,7 +305,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (n > 0) *m_stream << ", ";
*m_stream << mem->name;
n++;
......@@ -314,7 +314,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
if (n > 0) *m_stream << ", ";
......@@ -333,60 +333,34 @@ void CppCppDbCnvWriter::writeConstants() {
<< "Cnv::s_bulkSelectStatementString =" << endl
<< getIndent()
<< "\"DECLARE \\" << endl;
// We need to decide whether we can use the "%ROWTYPE" shortcut
bool useRowtype = true;
// We don't use ROWTYPE here and we explicitly provide the list of columns
// so to support the case of extra pure PL/SQL columns not used by the framework
*m_stream << getIndent()
<< " TYPE RecordType IS RECORD (";
n = 0;
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) {
useRowtype = false;
break;
}
}
if (useRowtype) {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) {
useRowtype = false;
break;
}
}
if (mem->stereotype == SQLONLY) continue;
if (n > 0) *m_stream << ", ";
*m_stream << mem->name << " " << getOraSQLType(mem->typeName);
n++;
}
if (useRowtype) {
*m_stream << getIndent()
<< " TYPE CurType IS REF CURSOR RETURN "
<< m_classInfo->className << "%ROWTYPE; \\"
<< endl;
} else {
// no ROWTYPE for us since we ignore some fields...
*m_stream << getIndent()
<< " TYPE RecordType IS RECORD (";
n = 0;
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
// Go through the associations
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
if (n > 0) *m_stream << ", ";
*m_stream << mem->name << " " << getOraSQLType(mem->typeName);
*m_stream << as->remotePart.name << " INTEGER";
n++;
}
// Go through the associations
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
if (n > 0) *m_stream << ", ";
*m_stream << as->remotePart.name << " INTEGER";
n++;
}
}
*m_stream << "); \\" << endl << getIndent()
<< " TYPE CurType IS REF CURSOR RETURN RecordType; \\"
<< endl;
}
*m_stream << "); \\" << endl << getIndent()
<< " TYPE CurType IS REF CURSOR RETURN RecordType; \\"
<< endl;
*m_stream << getIndent()
<< " PROCEDURE bulkSelect(ids IN castor.\\\"cnumList\\\", \\"
<< endl << getIndent()
......@@ -404,7 +378,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (n > 0) *m_stream << ", ";
*m_stream << mem->name;
n++;
......@@ -413,7 +387,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
if (n > 0) *m_stream << ", ";
......@@ -454,7 +428,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (mem->name == "id" ||
mem->name == "creationTime" ||
mem->name == "lastAccessTime" ||
......@@ -467,7 +441,7 @@ void CppCppDbCnvWriter::writeConstants() {
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (isEnum(as->remotePart.typeName)) {
if (n > 0) *m_stream << ", ";
n++;
......@@ -521,7 +495,7 @@ void CppCppDbCnvWriter::writeConstants() {
as = assocs.next()) {
if (as->remotePart.name == "" ||
isEnum(as->remotePart.typeName)) continue;
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_N &&
as->type.multiLocal == MULT_N) {
// N to N association
......@@ -842,7 +816,7 @@ void CppCppDbCnvWriter::writeConstructors() {
as = assocs.next()) {
if (as->remotePart.name == "" ||
isEnum(as->remotePart.typeName)) continue;
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_N &&
as->type.multiLocal == MULT_N) {
// N to N association
......@@ -945,7 +919,7 @@ void CppCppDbCnvWriter::writeReset() {
as = assocs.next()) {
if (as->remotePart.name == "" ||
isEnum(as->remotePart.typeName)) continue;
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_N &&
as->type.multiLocal == MULT_N) {
// N to N association
......@@ -1039,7 +1013,7 @@ void CppCppDbCnvWriter::writeReset() {
as = assocs.next()) {
if (as->remotePart.name == "" ||
isEnum(as->remotePart.typeName)) continue;
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_N &&
as->type.multiLocal == MULT_N) {
// N to N association
......@@ -1136,7 +1110,7 @@ void CppCppDbCnvWriter::writeFillRep() {
as = assocs.next()) {
if (as->remotePart.name != "" &&
!isEnum(as->remotePart.typeName)) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE ||
as->type.multiRemote == MULT_N) {
addInclude(QString("\"") + s_topNS + "/Constants.hpp\"");
......@@ -1198,7 +1172,7 @@ void CppCppDbCnvWriter::writeFillRep() {
as = assocs.next()) {
if (as->remotePart.name != "" &&
!isEnum(as->remotePart.typeName)) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE) {
writeBasicMult1FillRep(as);
} else if (as->type.multiRemote == MULT_N) {
......@@ -1252,7 +1226,7 @@ void CppCppDbCnvWriter::writeFillObj() {
as = assocs.next()) {
if (as->remotePart.name != "" &&
!isEnum(as->remotePart.typeName)) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE ||
as->type.multiRemote == MULT_N) {
addInclude(QString("\"") + s_topNS + "/Constants.hpp\"");
......@@ -1296,13 +1270,13 @@ void CppCppDbCnvWriter::writeFillObj() {
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
n++;
}
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->remotePart.name != "" &&
!isEnum(as->remotePart.typeName)) {
if (as->type.multiRemote == MULT_ONE) {
......@@ -2169,7 +2143,7 @@ void CppCppDbCnvWriter::writeCreateRepCheckStatements(QTextStream &stream,
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (mem->name != "id" &&
mem->name != "nbAccesses" &&
mem->name != "lastAccessTime") {
......@@ -2179,7 +2153,7 @@ void CppCppDbCnvWriter::writeCreateRepCheckStatements(QTextStream &stream,
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {
if (m_ignoreButForDB.find(as->remotePart.name) != m_ignoreButForDB.end()) continue;
if (as->remoteStereotype == SQLONLY) continue;
if (as->type.multiRemote == MULT_ONE &&
as->remotePart.name != "") {
n++;
......@@ -2242,7 +2216,7 @@ void CppCppDbCnvWriter::writeCreateRepContent(QTextStream &stream, bool &address
for (Member* mem = members.first();
0 != mem;
mem = members.next()) {
if (m_ignoreButForDB.find(mem->name) != m_ignoreButForDB.end()) continue;
if (mem->stereotype == SQLONLY) continue;
if (mem->name != "id" &&
mem->name != "nbCopyAccesses" &&
mem->name != "creationTime" &&
......@@ -2262,7 +2236,7 @@ void CppCppDbCnvWriter::writeCreateRepContent(QTextStream &stream, bool &address
for (Assoc* as = assocs.first();
0 != as;
as = assocs.next()) {