diff --git a/entity/InterestLink_entity/InterestLink_entity.aod b/entity/InterestLink_entity/InterestLink_entity.aod index 0110d444a8972a402073f6344ac80696da12a2d8..f43c4b6098f49ace05d731da38773da40088203c 100644 --- a/entity/InterestLink_entity/InterestLink_entity.aod +++ b/entity/InterestLink_entity/InterestLink_entity.aod @@ -39,8 +39,14 @@ <dependency> <name>dependency</name> <entityName>Interest_entity</entityName> - <fieldName>#PROVIDER</fieldName> + <fieldName>Interests</fieldName> </dependency> + <children> + <entityParameter> + <name>OnlyActive_param</name> + <valueProcess>%aditoprj%/entity/InterestLink_entity/entityfields/interests/children/onlyactive_param/valueProcess.js</valueProcess> + </entityParameter> + </children> </entityConsumer> <entityConsumer> <name>StatusKeyword</name> diff --git a/entity/InterestLink_entity/entityfields/interests/children/onlyactive_param/valueProcess.js b/entity/InterestLink_entity/entityfields/interests/children/onlyactive_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..b79bed7d644e36b82da688b0125065c3a1b66904 --- /dev/null +++ b/entity/InterestLink_entity/entityfields/interests/children/onlyactive_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(true); \ No newline at end of file diff --git a/entity/Interest_entity/Interest_entity.aod b/entity/Interest_entity/Interest_entity.aod index dc9842429d585425c7f804d86729a550adb85010..ae5bab0277d13b4a81797515c4c77593bfadb4bd 100644 --- a/entity/Interest_entity/Interest_entity.aod +++ b/entity/Interest_entity/Interest_entity.aod @@ -56,6 +56,14 @@ </entityParameter> </children> </entityConsumer> + <entityParameter> + <name>OnlyActive_param</name> + <valueProcess>%aditoprj%/entity/Interest_entity/entityfields/onlyactive_param/valueProcess.js</valueProcess> + <expose v="true" /> + </entityParameter> + <entityProvider> + <name>Interests</name> + </entityProvider> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Interest_entity/entityfields/onlyactive_param/valueProcess.js b/entity/Interest_entity/entityfields/onlyactive_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..c95b5dd1b4fc9b39fda3524b5ac7702157952322 --- /dev/null +++ b/entity/Interest_entity/entityfields/onlyactive_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(false); \ No newline at end of file diff --git a/entity/Interest_entity/recordcontainers/db/conditionProcess.js b/entity/Interest_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..1c67277a0a21b58929f46f887a384e5a59beee6c --- /dev/null +++ b/entity/Interest_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,11 @@ +import("system.result"); +import("system.vars"); +import("Sql_lib"); +import("KeywordRegistry_basic"); + +var cond = newWhere(); +if(vars.getString("$param.OnlyActive_param") == "true") +{ + cond.and("INTEREST.STATUS", $KeywordRegistry.interestStatus$inactive(), SqlBuilder.NOT_EQUAL()); +} +result.string(cond.toString()); \ No newline at end of file