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.
Constructor and Description |
---|
ExpandItem() |
Modifier and Type | Method and Description |
---|---|
DataPath |
getPath()
Return a path to be expanded in the query results.
|
DataQuery |
getQuery()
Return (nullable) A query to configure the expansion (including nested expands).
|
DataQuery |
getRequiredQuery()
Return
ExpandItem.query is it is non-null, otherwise a new DataQuery . |
boolean |
isHidden()
Return was this expand item added for internal use
(e.g.
|
static ExpandItem |
of(PropertyPath item)
Return a new expand item for the specified property.
|
void |
setHidden(boolean value)
Set was this expand item added for internal use
(e.g.
|
void |
setPath(DataPath value)
Set a path to be expanded in the query results.
|
void |
setQuery(DataQuery value)
Set 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 DataPath getPath()
Return a path to be expanded in the query results.
public DataQuery getQuery()
Return (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 boolean isHidden()
Return was this expand item added for internal use (e.g. needed for server-side query processing, but not requested by client).
public static ExpandItem of(PropertyPath item)
Return a new expand item for the specified property.
item
- Item to be expanded.public void setHidden(boolean value)
Set was this expand item added for internal use (e.g. needed for server-side query processing, but not requested by client).
value
- Was this expand item added for internal usepublic void setPath(DataPath value)
Set a path to be expanded in the query results.
value
- A path to be expanded in the query results.public void setQuery(DataQuery value)
Set a query to configure the expansion (including nested expands).
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
.
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.