Package io.micronaut.data.model.query
Class JoinPath
java.lang.Object
io.micronaut.data.model.query.JoinPath
A join path represents a path, association and join type for performing a join with a query.
- Since:
- 1.0.0
- Author:
- graemerocher
- See Also:
-
Constructor Summary
ConstructorDescriptionJoinPath
(@NonNull String path, @NonNull Association[] associationPath, Join.Type joinType, @Nullable String alias) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getAlias()
The alias for the join path.@NonNull Association
@NonNull String
getPath()
int
hashCode()
static JoinPath
of
(Association... associationPath) Create a join path from the association path.static JoinPath
of
(String alias, Association... associationPath) Create a join path from the association path.toString()
@NonNull JoinPath
Create a new join path with an alias.
-
Constructor Details
-
JoinPath
public JoinPath(@NonNull @NonNull String path, @NonNull @NonNull Association[] associationPath, @NonNull Join.Type joinType, @Nullable @Nullable String alias) Default constructor.- Parameters:
path
- The pathassociationPath
- The associationjoinType
- The join typealias
- The alias
-
-
Method Details
-
withAlias
Create a new join path with an alias.- Parameters:
alias
- The alias- Returns:
- a new join path
- Since:
- 4.9.0
-
getAlias
The alias for the join path.- Returns:
- The optional alias
-
toString
-
getAssociation
- Returns:
- The association
-
getLeadingAssociations
- Returns:
- The association leading to this association
-
getAssociationPath
- Returns:
- The association path.
-
getPath
- Returns:
- The association path
-
getJoinType
- Returns:
- The join type
-
equals
-
hashCode
public int hashCode() -
of
Create a join path from the association path.- Parameters:
associationPath
- The association path- Returns:
- The join path
-
of
Create a join path from the association path.- Parameters:
alias
- The alias to useassociationPath
- The association path- Returns:
- The join path
-