public class Path extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Path.PathElement
The path taken through data model associations to reference a given field.
|
Modifier and Type | Field and Description |
---|---|
protected List<Path.PathElement> |
pathElements |
Modifier | Constructor and Description |
---|---|
protected |
Path() |
|
Path(Class<?> entityClass,
EntityDictionary dictionary,
String dotSeparatedPath) |
|
Path(Class<?> entityClass,
EntityDictionary dictionary,
String fieldName,
String alias,
Set<Argument> arguments) |
|
Path(List<Path.PathElement> pathElements) |
|
Path(Path copy) |
|
Path(Type<?> entityClass,
EntityDictionary dictionary,
String dotSeparatedPath) |
|
Path(Type<?> entityClass,
EntityDictionary dictionary,
String fieldName,
String alias,
Set<Argument> arguments) |
Modifier and Type | Method and Description |
---|---|
String |
getAlias()
Returns an alias that uniquely identifies the last collection of entities in the path.
|
String |
getFieldPath() |
Optional<Path.PathElement> |
lastElement() |
protected boolean |
needNavigation(Type<?> entityClass,
String fieldName,
EntityDictionary dictionary)
Check whether a field need navigation to another entity.
|
protected Path.PathElement |
resolvePathAttribute(Type<?> entityClass,
String fieldName,
String alias,
Set<Argument> arguments,
EntityDictionary dictionary) |
protected List<Path.PathElement> |
resolvePathElements(Type<?> entityClass,
EntityDictionary dictionary,
String dotSeparatedPath)
Resolve a dot separated path into list of path elements.
|
String |
toString() |
protected List<Path.PathElement> pathElements
protected Path()
public Path(Path copy)
public Path(List<Path.PathElement> pathElements)
public Path(Class<?> entityClass, EntityDictionary dictionary, String dotSeparatedPath)
public Path(Type<?> entityClass, EntityDictionary dictionary, String dotSeparatedPath)
public Path(Class<?> entityClass, EntityDictionary dictionary, String fieldName, String alias, Set<Argument> arguments)
protected List<Path.PathElement> resolvePathElements(Type<?> entityClass, EntityDictionary dictionary, String dotSeparatedPath)
entityClass
- root class e.g. "foo"dictionary
- dictionarydotSeparatedPath
- path e.g. "bar.baz"protected Path.PathElement resolvePathAttribute(Type<?> entityClass, String fieldName, String alias, Set<Argument> arguments, EntityDictionary dictionary)
protected boolean needNavigation(Type<?> entityClass, String fieldName, EntityDictionary dictionary)
entityClass
- entity classfieldName
- field namedictionary
- dictionarypublic Optional<Path.PathElement> lastElement()
public String getFieldPath()
public String getAlias()
Copyright © 2015–2021 Yahoo! Inc.. All rights reserved.