|
@@ -3,10 +3,22 @@
|
|
|
|
|
|
#include "QxOrm.h"
|
|
|
#include "precompiled.h"
|
|
|
+class Airport;
|
|
|
+
|
|
|
+namespace qx {
|
|
|
+namespace dao {
|
|
|
+namespace detail {
|
|
|
+
|
|
|
+template <>
|
|
|
+struct QxDao_Trigger<Airport>;
|
|
|
+
|
|
|
+} // namespace detail
|
|
|
+} // namespace dao
|
|
|
+} // namespace qx
|
|
|
|
|
|
class Airport
|
|
|
{
|
|
|
-
|
|
|
+ friend struct qx::dao::detail::QxDao_Trigger<Airport>;
|
|
|
QX_REGISTER_FRIEND_CLASS(Airport)
|
|
|
|
|
|
protected:
|
|
@@ -61,7 +73,11 @@ public:
|
|
|
public:
|
|
|
|
|
|
static QString table_name(bool key = false) { return (key ? QString("Airport") : QString("T_CM_AIRPORT")); }
|
|
|
+protected:
|
|
|
|
|
|
+ // The following triggers methods must be implemented in a custom code
|
|
|
+ virtual void onBeforeFetch(qx::dao::detail::IxDao_Helper * dao);
|
|
|
+ virtual void onAfterFetch(qx::dao::detail::IxDao_Helper * dao);
|
|
|
};
|
|
|
|
|
|
typedef std::shared_ptr<Airport> Airport_ptr;
|
|
@@ -71,4 +87,26 @@ typedef std::shared_ptr<list_of_Airport> list_of_Airport_ptr;
|
|
|
QX_REGISTER_PRIMARY_KEY(Airport, double)
|
|
|
QX_REGISTER_HPP_USER(Airport, qx::trait::no_base_class_defined, 0)
|
|
|
|
|
|
+namespace qx {
|
|
|
+namespace dao {
|
|
|
+namespace detail {
|
|
|
+
|
|
|
+template <>
|
|
|
+struct QxDao_Trigger<Airport>
|
|
|
+{
|
|
|
+
|
|
|
+ static inline void onBeforeFetch(Airport * t, qx::dao::detail::IxDao_Helper * dao) { if (t) { t->onBeforeFetch(dao); } }
|
|
|
+ static inline void onAfterFetch(Airport * t, qx::dao::detail::IxDao_Helper * dao) { if (t) { t->onAfterFetch(dao); } }
|
|
|
+ static inline void onBeforeInsert(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+ static inline void onAfterInsert(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+ static inline void onBeforeUpdate(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+ static inline void onAfterUpdate(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+ static inline void onBeforeDelete(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+ static inline void onAfterDelete(Airport * t, qx::dao::detail::IxDao_Helper * dao) { Q_UNUSED(t); Q_UNUSED(dao); }
|
|
|
+};
|
|
|
+
|
|
|
+} // namespace detail
|
|
|
+} // namespace dao
|
|
|
+} // namespace qx
|
|
|
+
|
|
|
#endif // AIRPORT_H
|