persistent class %BI.KnowledgeCategory
extends %Persistent, %BI.Adaptor
property ACL
as %String(MAXLEN=10000);
property CategoryConsultant
as %String(TRUNCATE=1);
property CategoryDescription
as %String(MAXLEN=200,TRUNCATE=1);
property CategoryTitle
as %String(TRUNCATE=1);
property HelpDesk
as %Boolean;
relationship KnowledgeThread
as %BI.KnowledgeThread [ Inverse = KnowledgeCategory,Cardinality = children ];
property LastPostedDt
as %String(TRUNCATE=1);
property ParentCategory
as %String(TRUNCATE=1);
property PostOrdering
as %String(TRUNCATE=1);
property PreModule
as %String(MAXLEN=10000);
property ShowPostTitle
as %Boolean;
property SubModule
as %String(MAXLEN=10000);
property ThreadOrder
as array of %String(TRUNCATE=1);
property ThreadOrderBy
as %String(TRUNCATE=1);
property ThreadOrdering
as %String(TRUNCATE=1);
query CountNullCat(ID As %String)
SQL Query
:
SELECT Count(%ID) AS nullcatcnt FROM KnowledgeCategory
WHERE (ParentCategory is NULL)
query CountSubCat(ID As %String)
SQL Query
:
SELECT Count(%ID) AS subcatcnt FROM KnowledgeCategory
WHERE (ParentCategory = :ID)
query GetCatConsultant(number As %Integer)
SQL Query
:
SELECT CategoryConsultant FROM KnowledgeCategory
WHERE %ID = :number
query GetCatIdByName(name As %String)
SQL Query
:
SELECT %Id FROM %BI.KnowledgeCategory
WHERE CategoryTitle = :name
query GetSubCat(ID As %String)
SQL Query
:
SELECT %ID as ID FROM KnowledgeCategory
WHERE (ParentCategory = :ID) ORDER BY CategoryTitle
query NavDownCategories(number As %String)
SQL Query
:
SELECT %ID,CategoryTitle,CategoryDescription,CategoryConsultant,HelpDesk FROM %BI.KnowledgeCategory
WHERE ParentCategory = :number ORDER BY CategoryTitle
query NavDownNullCategories()
SQL Query
:
SELECT %ID,CategoryTitle,CategoryDescription,CategoryConsultant,HelpDesk FROM %BI.KnowledgeCategory
WHERE ParentCategory is NULL ORDER BY CategoryTitle