Copyright 2008 Motorola Inc. and Nokia Corporation. All Rights Reserved.
Specification License

javax.microedition.broadcast.esg
Class QueryComposer

java.lang.Object
  extended by javax.microedition.broadcast.esg.QueryComposer

public class QueryComposer
extends java.lang.Object

QueryComposer allows database queries to be composed. There are two types of queries that can be composed:

Here are some examples; simple queries:
 Query q1, q2, q3;
 q1 = QueryComposer.equivalent(CommonMetadataSet.SERVICE_NAME, "CNN");
 q2 = QueryComposer.currentProgram();
 q3 = QueryComposer.equivalent(CommonMetadataSet.PROGRAM_CONTENT_GENRE, StringAttribute.UNKNOWN_VALUE);
 
Compound queries:
 Query cq;
 cq = QueryComposer.and(q2, 
                QueryComposer.or(q1,
                        QueryComposer.equivalent(CommonMetadataSet.PROGRAM_CONTENT_GENRE, "News"))); 
 
The resulting queries can be used in ServiceGuide to query for matching programs, for example. On some implementations, the performance on complex compound queries can be slow.

Query rules are defined in ServiceGuide.