public class XmlIndexLookup
extends java.lang.Object
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)
.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
XmlIndexLookup(XmlIndexLookup o)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.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.
|
java.lang.String |
getNodeName()
Gets the name of the node to be used along with the indexing strategy
for the index lookup operation.
|
java.lang.String |
getNodeURI()
Gets the uri of the node to be used along with the indexing strategy
for the index lookup operation.
|
java.lang.String |
getParentName()
Gets the name of the parent node to be used for an edge index
lookup operation.
|
java.lang.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(java.lang.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(java.lang.String uri,
java.lang.String name)
Sets the name of the node to be used along with the indexing strategy
for the index lookup operation.
|
void |
setParent(java.lang.String uri,
java.lang.String name)
Sets the name of the parent node to be used for an edge index
lookup operation.
|
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
public XmlIndexLookup(XmlIndexLookup o) throws XmlException
XmlException
public void delete()
public java.lang.String getIndex() throws XmlException
XmlException
public void setIndex(java.lang.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 java.lang.String getNodeURI() throws XmlException
XmlException
public java.lang.String getNodeName() throws XmlException
XmlException
public void setNode(java.lang.String uri, java.lang.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 java.lang.String getParentURI() throws XmlException
XmlException
public java.lang.String getParentName() throws XmlException
XmlException
public void setParent(java.lang.String uri, java.lang.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
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.LTEXmlException
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
Copyright (c) 2004,2014 Oracle. All rights reserved.