Class Path
java.lang.Object
ch.tocco.nice2.persist.core.api.hibernate.query.selection.Path
Represents a selection path of a custom selection.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
@Nullable FieldModel
getField()
getPath()
int
hashCode()
boolean
isToMany()
static Path
parsePath
(EntityModel root, String path) static Path
parsePath
(EntityModel root, String basePath, String field)
-
Method Details
-
parsePath
-
parsePath
-
getPath
- Returns:
- the complete path from the root model
-
getPathWithoutField
- Returns:
- the complete path to the target entity (without the field) or an empty string if it is the root model
-
getRootModel
- Returns:
- the root
EntityModel
-
getEntityModel
- Returns:
- the
EntityModel
represented bygetPathWithoutField()
-
getField
- Returns:
- the
FieldModel
referenced by the path or null if an entire entity was selected
-
isToMany
public boolean isToMany()- Returns:
- if this path may result in multiple result values per result row
-
toPrimaryKeyPath
- Returns:
- path to the primary key of the entity referenced by
getPathWithoutField()
-
toEntityPath
-
getPathElements
- Returns:
- a list of
PathElement
that represent thisPath
. The list contains one element per 'step'.
-
hashCode
public int hashCode() -
equals
-