|
|
This is the idl using which a query can be constructed. The query is used by various Data Manager components, essentially to specify the datasets of interest.
See Also
netsys.datacollection.baseframework.DCBFWQuerySet
The following are Attribute Type constants . The query will be performed against these attributes.
Usage
enum AttributeType
{
EndOfList,
CatalogTypeName,
StartTime,
EndTime,
CollectionStatus,
Id,
MediatorId,
NumEntries,
SourceType,
NumConversations,
NumPackets,
NumBytes,
DeviceId,
NetworkName,
UserName,
ConjunctionOperator
};
Enumerators
EndOfList indicate end of the sequence
CataLogTypeName Catalog type
StartTime Collection start time
EndTime Collection end time
CollectionStatus status of the data collection action.
Id unique id for the data set in the catalog.
MediatorId identify the specific mediator.
NumEntries identify the specific mediator.
SourceType source type for the data set.
NumConversations # of entries in the data set
NumPackets # of packets in the data set
NumBytes # of bytes in the data set
DeviceId id of the device from which data is collected.
NetworkName name of the network to which the dataset is associated.
UserName name of the user.
ConjunctionOperator just a conjunction operator entry. To create a conjuction QueryPrimitive set the attrType to ConjunctionOperator and the operType to either of the two conjunction operator, AND or OR.
The operators supported by the query expression.
Usage
enum Operator
{
None,
And,
Or,
Eq,
Neq,
Leq,
Lt,
Geq,
Gt
};
Enumerators
None No operator specified. Just a place holder if we need it later.
And Logical AND operation. Used to form a conjunction.
Or Logical OR operation. Used to form a conjunction.
Eq Equals operator.
Neq Not equals operator.
Leq Less than or equal operator.
Lt Less than operator.
Geq Greater than or equal operator.
Gt Greater than operator.
Client needs to create a sequence of the QueryPrimitive structure that will be passed to the DataManager's query operation.
NOTE !! - The sequence of QueryPrimitive structure should be in postfix notation. All IDL api will accept a QueryPrimitive sequence. On the backend the sequence will be converted into a Stack before passing it on to the Collection repository.
Look at the createQueryStack method in QuerySetUtil.java. It is a convenient method that every manager can reuse to create a Stack from a QueryPrimitive sequence.
Another important point to note is to determine the # of elements in the sequence. If any QueryPrimitive attrType is set to EndOfList, following elements in the sequence are ignored. Otherwise the end of the sequence will mark the end of the query expression.
Usage
struct QueryPrimitive
{
AttributeType attrType;
Operator operType;
string value;
};
A sequence of query primitive objects. Each query primitive object is potentially a simple expression. These expression are combined together by conjunction operators AND and OR.
Usage
typedef sequence<QueryPrimitive> QueryPrimitiveSeq
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Tue Sep 26 17:00:30 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.