|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sdo.helper.extension.XPathHelper
public class XPathHelper
This singleton provides support for querying DataObjects via xpath expression where the result is a List containing one or more simple types or DataObjects.
Nested Class Summary | |
---|---|
class |
XPathHelper.QueryPart
A QueryPart knows the name of the property to be queried against on a given DataObject, as well as the value to be used in the comparison. |
Constructor Summary | |
---|---|
XPathHelper()
|
Method Summary | |
---|---|
protected java.util.List |
addResultsToList(java.lang.Object obj,
java.util.List results)
Convenience method that will add the provided object to the 'results' list if the object is non-null. |
java.util.List |
evaluate(java.lang.String expression,
DataObject dataObject)
Evaluate an XPath expression in the specified context and return a List containing any types or DataObjects that match the search criteria. |
static XPathHelper |
getInstance()
Returns the one and only instance of this singleton. |
protected java.lang.String |
getPathWithAtRemoved(java.lang.String expression)
Convenience method that strips off '@' portion, if one exists. |
protected java.lang.String |
getPathWithPrefixRemoved(java.lang.String expression)
Convenience method that strips off 'ns0:' portion, if one exists. |
XPathExpression |
prepareExpression(java.lang.String expression)
Create and return an XPathExpression, using the provided string to create the expression. |
protected boolean |
shouldCallXPathEngine(java.lang.String expression)
Convenience method for determining if XPathEngine should be called, i.e. the XPath expression contains functionality not yet supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPathHelper()
Method Detail |
---|
public static XPathHelper getInstance()
public XPathExpression prepareExpression(java.lang.String expression)
expression
-
public java.util.List evaluate(java.lang.String expression, DataObject dataObject)
expression
- dataObject
-
protected java.util.List addResultsToList(java.lang.Object obj, java.util.List results)
obj
- results
-
protected java.lang.String getPathWithAtRemoved(java.lang.String expression)
qualifiedName
-
protected java.lang.String getPathWithPrefixRemoved(java.lang.String expression)
qualifiedName
-
protected boolean shouldCallXPathEngine(java.lang.String expression)
expression
-
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |