com.novell.nds.dirxml.driver.xds
Class XDSQueryExElement

java.lang.Object
  extended bycom.novell.nds.dirxml.driver.xds.ElementImpl
      extended bycom.novell.nds.dirxml.driver.xds.XDSQueryElement
          extended bycom.novell.nds.dirxml.driver.xds.XDSQueryExElement
All Implemented Interfaces:
AssociationElementParent, CommandElement, XDSElement

public class XDSQueryExElement
extends XDSQueryElement
implements CommandElement, AssociationElementParent

A <query-ex> element.

Since:
DTD 2.0 //TODO: check DTD vesion!!!
See Also:
XDSCommandDocument, XDSQueryDocument

Field Summary
 
Fields inherited from class com.novell.nds.dirxml.driver.xds.XDSQueryElement
UNLIMITED_RESULTS
 
Method Summary
 XDSQueryTokenElement appendQueryTokenElement(String someToken)
          Appends an empty child <query-token; element to this element.
 List childElements()
          Returns this element's child elements.
 boolean containsQueryToken()
          Does this element contain a child <query-token> element?
 XDSQueryTokenElement extractQueryToken()
          Returns this element's child <query-token> element.
 String extractQueryTokenText()
          Returns the concatenated child text nodes from this element's child <query-token> element.
 boolean getCancel()
          Gets the value of this element's max-result-count attribute.
 int getMaxResultCount()
          Gets the value of this element's max-result-count attribute.
 boolean hasLimitedResults()
          Is this query's result set size limited?
 boolean hasUnlimitedResults()
          Is this query's result set size unlimited?
 boolean isCancelled()
          Has this query been cancelled?
 boolean isExtended()
          Does this query require special result set handling?
 boolean isIdentity()
          Is this query an identity query?
 boolean isInitialQuery()
          Is this query the first query in a sequence?
 boolean isSubsequentQuery()
          Is this query the nth query in a sequence?
 void setCancel(boolean cancel)
          Sets this element's cancel attribute to cancel.
 void setMaxResultCount(int someCount)
          Sets this element's max-result-count attribute to someCount.
 
Methods inherited from class com.novell.nds.dirxml.driver.xds.XDSQueryElement
appendAssociationElement, appendReadAttrElement, appendReadParentElement, appendSearchAttrElement, appendSearchClassElement, containsReadAttrElements, containsSearchAttrElements, containsSearchClassElements, extractAssociationElement, extractAssociationText, extractReadAttrElements, extractReadParentElement, extractSearchAttrElements, extractSearchClassElements, getClassName, getDestDN, getEventID, getQualifiedSrcDN, getScope, getSrcDN, getSrcEntryID, hasEntryScope, hasRootBaseObject, hasSubordinatesScope, hasSubtreeScope, setClassName, setDestDN, setDestEntryID, setEventID, setScope, shouldReadAttributes, shouldReadParent, shouldSearchAllClasses
 
Methods inherited from class com.novell.nds.dirxml.driver.xds.ElementImpl
attributeValueGet, attributeValueGet, attributeValueSet, documentImpl, domDocument, domElement, localName, namespaceName, position, tagName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.novell.nds.dirxml.driver.xds.CommandElement
getClassName, getEventID, getQualifiedSrcDN, getSrcDN, getSrcEntryID, setEventID
 
Methods inherited from interface com.novell.nds.dirxml.driver.xds.XDSElement
attributeValueGet, attributeValueGet, attributeValueSet, domDocument, domElement, localName, namespaceName, position, tagName
 
Methods inherited from interface com.novell.nds.dirxml.driver.xds.AssociationElementParent
appendAssociationElement, extractAssociationElement, extractAssociationText
 

Method Detail

isIdentity

public boolean isIdentity()
Is this query an identity query?

An identity query is used to identify a driver to the DirXML engine. A query is considered an identity query if either it has an event-id attribute value of "query-driver-ident" or it contains a <search-class> element with a class-name attribute value of "__driver_identification_class__".

Invocation Context:
READ

Overrides:
isIdentity in class XDSQueryElement
Returns:
true:
if this query is an identity query
false:
if this query is not an identity query

getMaxResultCount

public int getMaxResultCount()
Gets the value of this element's max-result-count attribute. This value specifies the upper limit of the result set for the all queries in the sequence. Values for this attribute in subsequent queries should be ignored.

Invocation Context:
READ

Overrides:
getMaxResultCount in class XDSQueryElement
Returns:
will return a positive integer (that is, > 1)
See Also:
Integer.MAX_VALUE

getCancel

public boolean getCancel()
Gets the value of this element's max-result-count attribute. This value specifies the upper limit of the result set for the all queries in the sequence. Values for this attribute in subsequent queries should be ignored.

Invocation Context:
READ

Returns:
will return a positive integer (that is, > 1)

isCancelled

public boolean isCancelled()
Has this query been cancelled?

Invocation Context:
READ

Overrides:
isCancelled in class XDSQueryElement
Returns:
true if it has; false if it hasn't

containsQueryToken

public boolean containsQueryToken()
Does this element contain a child <query-token> element?

Invocation Context:
READ

Overrides:
containsQueryToken in class XDSQueryElement
Returns:
true if it does; false otherwise

extractQueryToken

public XDSQueryTokenElement extractQueryToken()
Returns this element's child <query-token> element.

Invocation Context:
READ

Overrides:
extractQueryToken in class XDSQueryElement
Returns:
may return null

extractQueryTokenText

public String extractQueryTokenText()
Returns the concatenated child text nodes from this element's child <query-token> element.

Invocation Context:
READ

Overrides:
extractQueryTokenText in class XDSQueryElement
Returns:
always returns null

hasUnlimitedResults

public boolean hasUnlimitedResults()
Is this query's result set size unlimited?

Invocation Context:
READ

Overrides:
hasUnlimitedResults in class XDSQueryElement
Returns:
true if unlimited; false if limited

hasLimitedResults

public boolean hasLimitedResults()
Is this query's result set size limited?

Invocation Context:
READ

Overrides:
hasLimitedResults in class XDSQueryElement
Returns:
true if limited; false if unlimited

isInitialQuery

public boolean isInitialQuery()
Is this query the first query in a sequence?

Invocation Context:
READ

Overrides:
isInitialQuery in class XDSQueryElement
Returns:
true if this query does not contain a <query-token> child element; false otherwise

isSubsequentQuery

public boolean isSubsequentQuery()
Is this query the nth query in a sequence?

Invocation Context:
READ

Overrides:
isSubsequentQuery in class XDSQueryElement
Returns:
true if this query contains a <query-token> child element; false otherwise

isExtended

public boolean isExtended()
Does this query require special result set handling?

Invocation Context:
READ

Overrides:
isExtended in class XDSQueryElement
Returns:
true if result set size is unlimited and this query has a scope other than entry; false otherwise

childElements

public List childElements()
Returns this element's child elements.

Usage Notes:
The types of objects returned by this method may be extended in the future. Thus, callers should be able to handle object types other than those listed in the returns field below.
Invocation Context:
READ

Specified by:
childElements in interface XDSElement
Overrides:
childElements in class XDSQueryElement
Returns:
Collections.EMPTY_LIST or a list of XDSAssociationElement, XDSSearchClassElement, XDSSearchAttrElement, XDSReadAttrElement, XDSReadParentElement, XDSQueryTokenElement, and NonXDSElement objects; will not return null

setCancel

public void setCancel(boolean cancel)
Sets this element's cancel attribute to cancel.

Invocation Context:
WRITE

Parameters:
cancel - should this query be cancelled?

setMaxResultCount

public void setMaxResultCount(int someCount)
Sets this element's max-result-count attribute to someCount.

Invocation Context:
WRITE

Parameters:
someCount - if null or "", no action is taken

appendQueryTokenElement

public XDSQueryTokenElement appendQueryTokenElement(String someToken)
Appends an empty child <query-token; element to this element.

Invocation Context:
WRITE

Parameters:
someToken - may be null
Returns:
will not return null