java.lang.Object
io.ebean.text.PathProperties
- All Implemented Interfaces:
FetchPath
This is a Tree like structure of paths and properties that can be used for
defining which parts of an object graph to render in JSON or XML, and can
also be used to define which parts to select and fetch for an ORM query.
It provides a way of parsing a string representation of nested path properties and applying that to both what to fetch (ORM query) and what to render (JAX-RS JSON / XML).
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNested
(String prefix, PathProperties pathProps) void
<T> void
Apply these path properties as fetch paths to the query.getProperties
(String path) Get the properties for a given path.protected PathProperties.Props
boolean
Return true if the path is defined and has properties.boolean
includesPath
(String path) Return true if the fetch path is included in the PathProperties.boolean
includesPath
(String prefix, String name) Return true if the path is included using a prefix.boolean
includesProperty
(String name) Return true if the property (dot notation) is included in the PathProperties.boolean
includesProperty
(String prefix, String name) Return true if the property is included using a prefix.static PathProperties
Parse and return a PathProperties from nested string format like (a,b,c(d,e),f(g)) where "c" is a path containing "d" and "e" and "f" is a path containing "g" and the root path contains "a","b","c" and "f".toString()
-
Constructor Details
-
PathProperties
public PathProperties()Construct an empty PathProperties.
-
-
Method Details
-
parse
Parse and return a PathProperties from nested string format like (a,b,c(d,e),f(g)) where "c" is a path containing "d" and "e" and "f" is a path containing "g" and the root path contains "a","b","c" and "f". -
toString
-
hasPath
Return true if the path is defined and has properties. -
getProperties
Get the properties for a given path.- Specified by:
getProperties
in interfaceFetchPath
-
addToPath
-
addNested
-
getPathProps
-
apply
Apply these path properties as fetch paths to the query. -
getRootProperties
-
includesProperty
Return true if the property (dot notation) is included in the PathProperties. -
includesProperty
Return true if the property is included using a prefix. -
includesPath
Return true if the fetch path is included in the PathProperties.The fetch path is a OneToMany or ManyToMany path in dot notation.
-
includesPath
Return true if the path is included using a prefix.
-