Class XPathEngine
java.lang.Object
org.eclipse.persistence.sdo.helper.XPathEngine
Purpose: Perform operations based on SDO XPath against DataObjects.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvertObjectToValueByPath
(String path, Class cls, DataObject caller) access the wanted values through path and convert it into required java class.get
(String path, DataObject caller) When accessing values corresponding to properties of DataObject by path base accessors, the accessed getters will pass informations to this method to process information and acquire wanted values.static XPathEngine
boolean
isSet
(String path, DataObject caller) Handle queries about setting status of a property through path base access.void
set
(String path, Object value, DataObject caller, boolean convertValue) Set a property's value through the path base access.void
unset
(String path, DataObject caller) Unset the value of a property through the path base access.
-
Field Details
-
defaultXPathEngine
-
-
Method Details
-
getInstance
-
isSet
Handle queries about setting status of a property through path base access.- Parameters:
path
- the String representation of path based accesscaller
- the DataObject that pass path information in- Returns:
- true if queried property is set, otherwise false
-
unset
Unset the value of a property through the path base access.- Parameters:
path
- the String representation of path based accesscaller
- the DataObject that pass path information in
-
set
Set a property's value through the path base access.- Parameters:
path
- the String representation of path based accessvalue
- the value to be set as the target property's valuecaller
- the DataObject that pass path information inconvertValue
- boolean used for set if we should convert the value
-
get
When accessing values corresponding to properties of DataObject by path base accessors, the accessed getters will pass informations to this method to process information and acquire wanted values.- Parameters:
path
- the String representation of path based accesscaller
- the DataObject that pass path information in- Returns:
- the value gotten by accessing through path
-
convertObjectToValueByPath
public Object convertObjectToValueByPath(String path, Class cls, DataObject caller) throws ClassCastException access the wanted values through path and convert it into required java class. If conversion is not supported, exception is thrown.- Parameters:
path
- string representation of accessing pathcls
- the java class that accessed value is to be converted tocaller
- the DataObject that pass the path in- Returns:
- values to be accessed
- Throws:
ClassCastException
-