|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.mdm.index.objects.epath.EPathAPI
The methods in this class are convenience methods for using the EPath object.
Constructor Summary | |
protected |
EPathAPI()
prevent creation |
Method Summary | |
static void |
addObjectValue(EPath e,
ObjectNode context,
java.lang.Object value)
sets a field value, creates new objects along the path if it does not exist already. |
static void |
addObjectValues(EPath e,
int pos,
ObjectNode context,
java.util.ArrayList values)
set a field on one or multiple object nodes with the provided values e.g. |
static void |
getFieldList(EPath e,
int pos,
ObjectNode context,
java.util.List values)
Convenience method to return a list of field values denoted by the EPath object for Example, Person.Address[*].Line1 returns a collection of Line1 from each of the Addresss objects |
static java.lang.Object |
getFieldValue(EPath e,
ObjectNode context)
uses the parsed op commands to traverse the ObjectNode and return the value specified by the EPath object. |
static java.lang.Object |
getFieldValue(java.lang.String fqfn,
ObjectNode context)
Use an EPath string to select a single field object. |
static java.lang.Object |
getFieldValueQB(EPath e,
ObjectNode context)
uses the parsed op commands to traverse the ObjectNode and return the value specified by the EPath object. |
static java.lang.Object |
getFieldValueRec(EPath e,
ObjectNode context,
int pos)
|
static java.lang.String |
maskString(java.lang.Object str)
|
static void |
setFieldNull(java.lang.String fqfn,
ObjectNode context,
boolean forceNullable)
uses the parsed op commands to traverse the ObjectNode and set the field specified by the Epath Object to null. |
static void |
setFieldValue(EPath e,
ObjectNode context,
java.lang.Object value)
uses the parsed op commands to traverse the ObjectNode and set the value specified by the Epath Object. |
static void |
setFieldValue(EPath e,
ObjectNode context,
java.lang.Object value,
boolean byReference)
uses the parsed op commands to traverse the ObjectNode and set the value specified by the Epath Object. |
static void |
setFieldValue(java.lang.String fqfn,
ObjectNode context,
java.lang.Object value)
uses the EPath String to traverse the ObjectNode and set the value specified by the Epath Object. |
static void |
setFieldValue(java.lang.String fqfn,
ObjectNode context,
java.lang.Object value,
boolean byReference)
uses the EPath String to traverse the ObjectNode and set the value specified by the Epath Object. |
static java.lang.String |
unmaskString(java.lang.Object str)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected EPathAPI()
Method Detail |
public static void addObjectValue(EPath e, ObjectNode context, java.lang.Object value) throws ObjectException, EPathException
e
- EPath Objectcontext
- context of the operationvalue
- value
ObjectException
- ObjectNode access exception
EPathException
- unsupported operationpublic static void addObjectValues(EPath e, int pos, ObjectNode context, java.util.ArrayList values) throws ObjectException, EPathException
e
- EPath objectpos
- The current position, only used internally for recursion. Should be set to 0 in the initial call.context
- context of the operationvalues
- pre allocated list to hold values
ObjectException
- ObjectNode access exception
EPathException
- unsupported operationpublic static void getFieldList(EPath e, int pos, ObjectNode context, java.util.List values) throws ObjectException, EPathException
e
- the epath objectpos
- The current position, only used internally for recursion. Should be set to 0 in the initial call.context
- context of the operationvalues
- pre allocated list to hold values
ObjectException
- ObjectNode access exception
EPathException
- unsupported operationpublic static java.lang.Object getFieldValue(EPath e, ObjectNode context) throws ObjectException, EPathException
e
- EPath object, contains parsed op commands and fqfncontext
- ObjectNode, the node where the path starts
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static java.lang.Object getFieldValue(java.lang.String fqfn, ObjectNode context) throws ObjectException, EPathException
fqfn
- EPath stringcontext
- ObjectNode where the traversal begins
ObjectException
- object access exception
EPathException
- EPath exceptionpublic static java.lang.Object getFieldValueQB(EPath e, ObjectNode context) throws ObjectException, EPathException
e
- EPath object, contains parsed op commands and fqfncontext
- ObjectNode, the node where the path starts
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static java.lang.Object getFieldValueRec(EPath e, ObjectNode context, int pos) throws ObjectException, EPathException
ObjectException
EPathException
public static java.lang.String maskString(java.lang.Object str)
public static void setFieldNull(java.lang.String fqfn, ObjectNode context, boolean forceNullable) throws ObjectException, EPathException
fqfn
- Fully qualified field namecontext
- ObjectNode where the EPath beginsforceNullable
- Null field even if not set as nullable
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static void setFieldValue(EPath e, ObjectNode context, java.lang.Object value) throws ObjectException, EPathException
e
- EPath Objectcontext
- ObjectNode where the EPath beginsvalue
- value of the object to set. If the EPath is points to a
collection, designated by [*], then the value must be of the Collection
type. If the EPath points to a complete object, denoted by child[key].*,
then the value must be of ObjectNode type
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static void setFieldValue(EPath e, ObjectNode context, java.lang.Object value, boolean byReference) throws ObjectException, EPathException
e
- EPath Objectcontext
- ObjectNode where the EPath beginsvalue
- value of the object to set. If the EPath is points to a
collection, designated by [*], then the value must be of the Collection
type. If the EPath points to a complete object, denoted by child[key].*,
then the value must be of ObjectNode typebyReference
- sets the field value by reference
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static void setFieldValue(java.lang.String fqfn, ObjectNode context, java.lang.Object value) throws ObjectException, EPathException
fqfn
- EPath stringcontext
- ObjectNode where the EPath beginsvalue
- value of the object to set. If the EPath is points to a
collection, designated by [*], then the value must be of the Collection
type
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static void setFieldValue(java.lang.String fqfn, ObjectNode context, java.lang.Object value, boolean byReference) throws ObjectException, EPathException
fqfn
- EPath stringcontext
- ObjectNode where the EPath beginsvalue
- value of the object to set. If the EPath is points to a
collection, designated by [*], then the value must be of the Collection
typebyReference
- adds the value as a reference
ObjectException
- ObjectNode access exception
EPathException
- EPath exceptionpublic static java.lang.String unmaskString(java.lang.Object str)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Sun Microsystems, Inc.