Eneboo - Documentación para desarrolladores
|
00001 /*************************************************************************** 00002 AQSTableMD_p.h 00003 ------------------- 00004 begin : 29/03/2011 00005 copyright : (C) 2003-2011 by InfoSiAL S.L. 00006 email : mail@infosial.com 00007 ***************************************************************************/ 00008 /*************************************************************************** 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; version 2 of the License. * 00012 ***************************************************************************/ 00013 /*************************************************************************** 00014 Este programa es software libre. Puede redistribuirlo y/o modificarlo 00015 bajo los términos de la Licencia Pública General de GNU en su 00016 versión 2, publicada por la Free Software Foundation. 00017 ***************************************************************************/ 00018 00019 #ifndef AQSTABLEMD_P_H_ 00020 #define AQSTABLEMD_P_H_ 00021 00022 #include "AQSObject_p.h" 00023 #include "AQObjects.h" 00024 00025 class AQSTableMD : public AQSObject 00026 { 00027 Q_OBJECT 00028 00029 AQ_DECLARE_AQS_AQOBJECT(TableMD, Object); 00030 00031 //@AQ_BEGIN_DEF_PUB_SLOTS@ 00032 public slots: 00033 QString name() const; 00034 void setName(const QString &); 00035 void setAlias(const QString &); 00036 void setQuery(const QString &); 00037 QString alias() const; 00038 QString query() const; 00039 bool isQuery() const; 00040 void addFieldMD(FLFieldMetaData *); 00041 void removeFieldMD(const QString &); 00042 QString primaryKey(bool = false) const; 00043 QString fieldNameToAlias(const QString &) const; 00044 QString fieldAliasToName(const QString &) const; 00045 int fieldType(const QString &) const; 00046 bool fieldIsPrimaryKey(const QString &) const; 00047 bool fieldIsIndex(const QString &) const; 00048 bool fieldIsCounter(const QString &) const; 00049 bool fieldAllowNull(const QString &) const; 00050 bool fieldIsUnique(const QString &) const; 00051 QString fieldTableM1(const QString &) const; 00052 QString fieldForeignFieldM1(const QString &) const; 00053 FLRelationMetaData *relation(const QString &, const QString &, const QString &) const; 00054 int fieldLength(const QString &) const; 00055 int fieldPartInteger(const QString &) const; 00056 int fieldPartDecimal(const QString &) const; 00057 bool fieldCalculated(const QString &) const; 00058 bool fieldVisible(const QString &) const; 00059 FLFieldMetaData *field(const QString &) const; 00060 QString fieldList(bool) const; 00061 QString fieldsNames() const; 00062 QStringList fieldsNamesUnlock() const; 00063 bool concurWarn() const; 00064 void setConcurWarn(bool = true); 00065 bool detectLocks() const; 00066 void setDetectLocks(bool = true); 00067 00068 protected: 00069 static void *construct(const QSArgumentList &args) { 00070 QMap<int, QStringList> candidates; 00071 candidates[2].append(QString::fromLatin1("QString,QString")); 00072 candidates[3].append(QString::fromLatin1("QString,QString,QString")); 00073 QString sgt(castArgsSignature(args, candidates)); 00074 if (sgt == QString::fromLatin1("QString,QString")) 00075 return new AQTableMD(*(argValue<QString *>(args[0])), 00076 *(argValue<QString *>(args[1]))); 00077 if (sgt == QString::fromLatin1("QString,QString,QString")) 00078 return new AQTableMD(*(argValue<QString *>(args[0])), 00079 *(argValue<QString *>(args[1])), 00080 *(argValue<QString *>(args[2]))); 00081 return 0; 00082 } 00083 00084 public: 00085 static QMap<int, QStringList> candidateConstructors() { 00086 QMap<int, QStringList> candidates; 00087 candidates[2].append(QString::fromLatin1("QString,QString")); 00088 candidates[3].append(QString::fromLatin1("QString,QString,QString")); 00089 return candidates; 00090 } 00091 //@AQ_END_DEF_PUB_SLOTS@ 00092 }; 00093 00094 //@AQ_BEGIN_IMP_PUB_SLOTS@ 00095 inline QString AQSTableMD::name() const 00096 { 00097 AQ_CALL_RET_V(name(), QString); 00098 } 00099 inline void AQSTableMD::setName(const QString &arg0) 00100 { 00101 AQ_CALL_VOID(setName(arg0)); 00102 } 00103 inline void AQSTableMD::setAlias(const QString &arg0) 00104 { 00105 AQ_CALL_VOID(setAlias(arg0)); 00106 } 00107 inline void AQSTableMD::setQuery(const QString &arg0) 00108 { 00109 AQ_CALL_VOID(setQuery(arg0)); 00110 } 00111 inline QString AQSTableMD::alias() const 00112 { 00113 AQ_CALL_RET_V(alias(), QString); 00114 } 00115 inline QString AQSTableMD::query() const 00116 { 00117 AQ_CALL_RET_V(query(), QString); 00118 } 00119 inline bool AQSTableMD::isQuery() const 00120 { 00121 AQ_CALL_RET_V(isQuery(), bool); 00122 } 00123 inline void AQSTableMD::addFieldMD(FLFieldMetaData *arg0) 00124 { 00125 AQ_CALL_VOID(addFieldMD(arg0)); 00126 } 00127 inline void AQSTableMD::removeFieldMD(const QString &arg0) 00128 { 00129 AQ_CALL_VOID(removeFieldMD(arg0)); 00130 } 00131 inline QString AQSTableMD::primaryKey(bool arg0) const 00132 { 00133 AQ_CALL_RET_V(primaryKey(arg0), QString); 00134 } 00135 inline QString AQSTableMD::fieldNameToAlias(const QString &arg0) const 00136 { 00137 AQ_CALL_RET_V(fieldNameToAlias(arg0), QString); 00138 } 00139 inline QString AQSTableMD::fieldAliasToName(const QString &arg0) const 00140 { 00141 AQ_CALL_RET_V(fieldAliasToName(arg0), QString); 00142 } 00143 inline int AQSTableMD::fieldType(const QString &arg0) const 00144 { 00145 AQ_CALL_RET_V(fieldType(arg0), int); 00146 } 00147 inline bool AQSTableMD::fieldIsPrimaryKey(const QString &arg0) const 00148 { 00149 AQ_CALL_RET_V(fieldIsPrimaryKey(arg0), bool); 00150 } 00151 inline bool AQSTableMD::fieldIsIndex(const QString &arg0) const 00152 { 00153 AQ_CALL_RET_V(fieldIsIndex(arg0), bool); 00154 } 00155 inline bool AQSTableMD::fieldIsCounter(const QString &arg0) const 00156 { 00157 AQ_CALL_RET_V(fieldIsCounter(arg0), bool); 00158 } 00159 inline bool AQSTableMD::fieldAllowNull(const QString &arg0) const 00160 { 00161 AQ_CALL_RET_V(fieldAllowNull(arg0), bool); 00162 } 00163 inline bool AQSTableMD::fieldIsUnique(const QString &arg0) const 00164 { 00165 AQ_CALL_RET_V(fieldIsUnique(arg0), bool); 00166 } 00167 inline QString AQSTableMD::fieldTableM1(const QString &arg0) const 00168 { 00169 AQ_CALL_RET_V(fieldTableM1(arg0), QString); 00170 } 00171 inline QString AQSTableMD::fieldForeignFieldM1(const QString &arg0) const 00172 { 00173 AQ_CALL_RET_V(fieldForeignFieldM1(arg0), QString); 00174 } 00175 inline FLRelationMetaData *AQSTableMD::relation(const QString &arg0, const QString &arg1, const QString &arg2) const 00176 { 00177 AQ_CALL_RET(relation(arg0, arg1, arg2)); 00178 } 00179 inline int AQSTableMD::fieldLength(const QString &arg0) const 00180 { 00181 AQ_CALL_RET_V(fieldLength(arg0), int); 00182 } 00183 inline int AQSTableMD::fieldPartInteger(const QString &arg0) const 00184 { 00185 AQ_CALL_RET_V(fieldPartInteger(arg0), int); 00186 } 00187 inline int AQSTableMD::fieldPartDecimal(const QString &arg0) const 00188 { 00189 AQ_CALL_RET_V(fieldPartDecimal(arg0), int); 00190 } 00191 inline bool AQSTableMD::fieldCalculated(const QString &arg0) const 00192 { 00193 AQ_CALL_RET_V(fieldCalculated(arg0), bool); 00194 } 00195 inline bool AQSTableMD::fieldVisible(const QString &arg0) const 00196 { 00197 AQ_CALL_RET_V(fieldVisible(arg0), bool); 00198 } 00199 inline FLFieldMetaData *AQSTableMD::field(const QString &arg0) const 00200 { 00201 AQ_CALL_RET(field(arg0)); 00202 } 00203 inline QString AQSTableMD::fieldList(bool arg0) const 00204 { 00205 AQ_CALL_RET_V(fieldList(arg0), QString); 00206 } 00207 inline QString AQSTableMD::fieldsNames() const 00208 { 00209 AQ_CALL_RET_V(fieldsNames(), QString); 00210 } 00211 inline QStringList AQSTableMD::fieldsNamesUnlock() const 00212 { 00213 AQ_CALL_RET_V(fieldsNamesUnlock(), QStringList); 00214 } 00215 inline bool AQSTableMD::concurWarn() const 00216 { 00217 AQ_CALL_RET_V(concurWarn(), bool); 00218 } 00219 inline void AQSTableMD::setConcurWarn(bool arg0) 00220 { 00221 AQ_CALL_VOID(setConcurWarn(arg0)); 00222 } 00223 inline bool AQSTableMD::detectLocks() const 00224 { 00225 AQ_CALL_RET_V(detectLocks(), bool); 00226 } 00227 inline void AQSTableMD::setDetectLocks(bool arg0) 00228 { 00229 AQ_CALL_VOID(setDetectLocks(arg0)); 00230 } 00231 //@AQ_END_IMP_PUB_SLOTS@ 00232 00233 #endif /* AQSTABLEMD_P_H_ */ 00234 // @AQOBJECT@