|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.dbxml.XmlIndexLookup
public class XmlIndexLookup
The XmlIndexLookup class encapsulates the context within which an index lookup operation can be performed on an XmlContainer object. The lookup is performed using an XmlIndexLookup object, and a series of methods of that object that specify how the lookup is to be performed. Using these methods, it is possible to specify inequality lookups, range lookups, and simple value lookups, as well as the sort order of the results. By default, results are returned in the sort order of the index.
XmlIndexLookup objects are created using XmlManager.createIndexLookup(com.sleepycat.dbxml.XmlContainer, java.lang.String, java.lang.String, java.lang.String, com.sleepycat.dbxml.XmlValue, int)
.
XmlIndexLookup objects are not thread-safe, and may not be shared among threads while being configured. A constructed, read-only object may be shared among threads for multiple calls to execute(com.sleepycat.dbxml.XmlQueryContext)
.
Field Summary | |
---|---|
static int |
EQ
Operation equal (==) |
static int |
GT
Operation greater than (>) |
static int |
GTE
Operation greater than or equal (>=) |
static int |
LT
Operation less than (<) |
static int |
LTE
Operation less than or equal (<=) |
static int |
NONE
Empty/no operation |
Constructor Summary | |
---|---|
XmlIndexLookup(XmlIndexLookup o)
Copy constructor |
Method Summary | |
---|---|
void |
delete()
Free the native resources associated with this object |
XmlResults |
execute(XmlQueryContext context)
Executes the index lookup operation specified by the configuration of the XmlIndexLookup object. |
XmlResults |
execute(XmlQueryContext context,
XmlDocumentConfig config)
Executes the index lookup operation specified by the configuration of the XmlIndexLookup object. |
XmlResults |
execute(XmlTransaction txn,
XmlQueryContext context)
Executes the index lookup operation specified by the configuration of the XmlIndexLookup object. |
XmlResults |
execute(XmlTransaction txn,
XmlQueryContext context,
XmlDocumentConfig config)
Executes the index lookup operation specified by the configuration of the XmlIndexLookup object. |
XmlContainer |
getContainer()
Gets the container on which the index lookup operation is to be performed. |
int |
getHighBoundOperation()
Gets the operation to be used for the upper bound for a range index lookup operation. |
XmlValue |
getHighBoundValue()
Gets the value to be used for the upper bound for a range index lookup operation. |
String |
getIndex()
Gets the indexing strategy to be used for the index lookup operation. |
int |
getLowBoundOperation()
Gets the operation to be used for the lower bound for a range index lookup operation, or the single operation for a simple inequality lookup. |
XmlValue |
getLowBoundValue()
Gets the value to be used for the lower bound for a range index lookup operation, or the single operation for a simple inequality lookup. |
String |
getNodeName()
Gets the name of the node to be used along with the indexing strategy for the index lookup operation. |
String |
getNodeURI()
Gets the uri of the node to be used along with the indexing strategy for the index lookup operation. |
String |
getParentName()
Gets the name of the parent node to be used for an edge index lookup operation. |
String |
getParentURI()
Gets the uri of the parent node to be used for an edge index lookup operation. |
void |
setContainer(XmlContainer container)
Sets the container on which the index lookup operation is to be performed. |
void |
setHighBound(XmlValue value,
int op)
Sets the operation and value to be used for the upper bound for a range index lookup operation. |
void |
setIndex(String index)
Sets the indexing strategy to be used for the index lookup operation. |
void |
setLowBound(XmlValue value,
int op)
Sets the operation and value to be used for the index lookup operation. |
void |
setNode(String uri,
String name)
Sets the name of the node to be used along with the indexing strategy for the index lookup operation. |
void |
setParent(String uri,
String name)
Sets the name of the parent node to be used for an edge index lookup operation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int EQ
public static final int GT
public static final int GTE
public static final int LT
public static final int LTE
Constructor Detail |
---|
public XmlIndexLookup(XmlIndexLookup o) throws XmlException
XmlException
Method Detail |
---|
public void delete()
public String getIndex() throws XmlException
XmlException
public void setIndex(String index) throws XmlException
index
- A string that represent the indexing
strategy. See XmlIndexSpecification.addIndex(String, String,
String)
for a description of valid index specifications,
with the exceptions that
only one index can be specified, and substring indexes are not supported.
XmlException
public String getNodeURI() throws XmlException
XmlException
public String getNodeName() throws XmlException
XmlException
public void setNode(String uri, String name) throws XmlException
uri
- The namespace of the node to be used. The default namespace
is selected by passing an empty string for the namespace.name
- The name of the element or attribute node to be used.
XmlException
public String getParentURI() throws XmlException
XmlException
public String getParentName() throws XmlException
XmlException
public void setParent(String uri, String name) throws XmlException
uri
- The namespace of the parent node to be used. The default
namespace is selected by passing an empty string for the namespace.name
- The name of the parent element node to be used.
XmlException
public XmlValue getLowBoundValue() throws XmlException
XmlException
public int getLowBoundOperation() throws XmlException
XmlException
public void setLowBound(XmlValue value, int op) throws XmlException
value
- The value to be used for the lower bound. An empty value
is specified using an uninitialized XmlValue object.op
- Selects the operation to be performed. Must be one of:
XmlIndexLookup.NONE, XmlIndexLookup.EQ, XmlIndexLookup.GT,
XmlIndexLookup.GTE, XmlIndexLookup.LT, XmlIndexLookup.LTE
XmlException
public XmlValue getHighBoundValue() throws XmlException
XmlException
public int getHighBoundOperation() throws XmlException
XmlException
public void setHighBound(XmlValue value, int op) throws XmlException
value
- The value to be used for the upper bound. Use of an empty
value results in an inequality lookup, rather than a range lookup.op
- The operation to be used on the upper bound. Must be either
XmlIndexLookup.LT or XmlIndexLookup.LTE
XmlException
public XmlContainer getContainer() throws XmlException
XmlException
public void setContainer(XmlContainer container) throws XmlException
container
- The XmlContainer
to use for the operation.
XmlException
public XmlResults execute(XmlQueryContext context) throws XmlException
XmlIndexLookup
object.
context
- The XmlQueryContext
to use for the operation.
XmlException
public XmlResults execute(XmlTransaction txn, XmlQueryContext context) throws XmlException
XmlIndexLookup
object.
txn
- If the operation is to be transaction-protected,
the txn
parameter is an XmlTransaction
handle
returned from XmlManager.createTransaction()
.context
- The XmlQueryContext
to use for the operation.
XmlException
public XmlResults execute(XmlQueryContext context, XmlDocumentConfig config) throws XmlException
XmlIndexLookup
object.
context
- The XmlQueryContext
to use for the operation.config
- The XmlDocumentConfig
object specifying
configuration settings for this operation.
XmlException
public XmlResults execute(XmlTransaction txn, XmlQueryContext context, XmlDocumentConfig config) throws XmlException
XmlIndexLookup
object.
txn
- If the operation is to be transaction-protected,
the txn
parameter is an XmlTransaction
handle
returned from XmlManager.createTransaction()
.context
- The XmlQueryContext
to use for the operation.config
- The XmlDocumentConfig
object specifying
configuration settings for this operation.
XmlException
|
Berkeley DB XML version 2.3.10 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |