persistent class EnsLib.PubSub.Subscriber
extends EnsLib.PubSub.Target, %CSP.Util.AutoForm
Represents a subscriber to a Publish / Subscribe list.
parameter DOMAIN = "Ensemble";
Use our own domain for localization
property DomainName
as DomainName(XMLNAME="Domain",XMLPROJECTION="ATTRIBUTE",XMLREFERENCE="ID");
Domain value used to keep this subscriber separate from others.
relationship Subscriptions
as Subscription(XMLPROJECTION="NONE") [ Inverse = Subscriber,Cardinality = many ];
Subscriptions for this subscriber
classmethod FindSubscriber(pDomain As %String = "", pName As %String)
as Subscriber
Look up a subscriber object given a domain and subscriber name.
classmethod FindSubscriberId(pDomain As %String = "", pName As %String)
as %String
Look up a subscriber object id given a domain and subscriber name.
query Enumerate()
SQL Query
:
SELECT %ID,DomainName,Name,Target,Address
FROM Subscriber
ORDER BY DomainName,Name
Provide a list of subscribers.
query SubscriberList()
SQL Query
:
SELECT %ID,
CASE
WHEN DomainName IS NULL THEN Name
ELSE DomainName || '/' || Name
END As Name
FROM Subscriber
ORDER BY (DomainName),(Name)
Provide a list of subscribers with domain names
index (NameIdx on DomainName,Name) [Unique];