Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_TRANSITIONRULETRANSFORM_H_
2 #define MOJA_MODULES_CBM_TRANSITIONRULETRANSFORM_H_
4 #include "moja/datarepository/iproviderrelationalinterface.h"
5 #include "moja/flint/ilandunitcontroller.h"
6 #include "moja/flint/itransform.h"
8 #include <Poco/LRUCache.h>
9 #include <Poco/ThreadLocal.h>
18 const flint::ILandUnitController& landUnitController,
19 datarepository::DataRepository& dataRepository)
override;
22 const DynamicVar&
value()
const override;
27 std::shared_ptr<datarepository::IProviderRelationalInterface>
_provider;
30 mutable Poco::ThreadLocal<Poco::LRUCache<std::string, DynamicVar>>
_cache;
32 const std::string
buildSql(
const DynamicObject& classifierSet)
const;
40 ROW_NUMBER() OVER (PARTITION BY disturbance_type ORDER BY score DESC) AS tr_rank,
45 dt.name AS disturbance_type,
48 WHEN c.name IN (%1%) THEN
50 WHEN cv.value LIKE '?' THEN 1
57 FROM transition_rule tr
58 INNER JOIN transition_rule_classifier_value trv
59 ON trv.transition_rule_id = tr.id
60 INNER JOIN classifier_value cv
61 ON trv.classifier_value_id = cv.id
62 INNER JOIN classifier c
63 ON cv.classifier_id = c.id
64 INNER JOIN disturbance_type dt
65 ON tr.disturbance_type_id = dt.id
68 tr.disturbance_type_id
71 WHEN c.name IN (%1%) THEN
73 WHEN cv.value LIKE '?' THEN 1
80 ) AS transition_ranking
85 const std::string
_matchSql =
"WHEN c.name LIKE '%1%' AND cv.value LIKE '%2%' THEN 4 ";
90 #endif // MOJA_MODULES_CBM_TRANSITIONRULETRANSFORM_H_
Definition: ageclasshelper.cpp:12
Definition: ageclasshelper.cpp:10