public class ExpandItem
extends java.lang.Object
Encapsulates an OData expand item. An expand item indicates a property (or expression) that is used in the $expand system query option.
Type | Property and Description |
---|---|
Property |
to
If this expand item references a simple property path, then return the property.
|
Property |
toRequired
If this expand item references a simple property path, then return the property.
|
Constructor and Description |
---|
ExpandItem() |
Modifier and Type | Method and Description |
---|---|
DataPath |
getPath()
A path to be expanded in the query results.
|
DataQuery |
getQuery()
(nullable) A query to configure the expansion (including nested expands).
|
DataQuery |
getRequiredQuery()
Return
ExpandItem.query is it is non-null, otherwise a new DataQuery . |
static ExpandItem |
of(PropertyPath item)
Return a new expand item for the specified property.
|
void |
setPath(DataPath value)
A path to be expanded in the query results.
|
void |
setQuery(DataQuery value)
A query to configure the expansion (including nested expands).
|
Property |
toProperty()
If this expand item references a simple property path, then return the property.
|
Property |
toRequiredProperty()
If this expand item references a simple property path, then return the property.
|
java.lang.String |
toString()
Return a string representation of this expand item.
|
ExpandItem |
withQuery(DataQuery query)
Set the query of this expand item.
|
public Property toProperty
If this expand item references a simple property path, then return the property. Otherwise return null
.
public Property toRequiredProperty
If this expand item references a simple property path, then return the property. Otherwise throw an exception.
UndefinedException
if this select item does not reference a simple property path.
public DataPath getPath()
A path to be expanded in the query results.
public DataQuery getQuery()
(nullable) A query to configure the expansion (including nested expands).
public DataQuery getRequiredQuery()
Return ExpandItem.query
is it is non-null, otherwise a new DataQuery
.
ExpandItem.query
is it is non-null, otherwise a new DataQuery
.public static ExpandItem of(PropertyPath item)
Return a new expand item for the specified property.
item
- Item to be expanded.public void setPath(DataPath value)
A path to be expanded in the query results.
public void setQuery(DataQuery value)
A query to configure the expansion (including nested expands).
public Property toProperty()
If this expand item references a simple property path, then return the property. Otherwise return null
.
public Property toRequiredProperty()
If this expand item references a simple property path, then return the property. Otherwise throw an exception.
UndefinedException
if this select item does not reference a simple property path.
public java.lang.String toString()
Return a string representation of this expand item.
toString
in class java.lang.Object
public ExpandItem withQuery(DataQuery query)
Set the query of this expand item.
query
- Data query.