Package io.micronaut.data.model.query
Class JoinPath
- java.lang.Object
-
- io.micronaut.data.model.query.JoinPath
-
public class JoinPath extends java.lang.Object
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:
QueryModel
-
-
Constructor Summary
Constructors Constructor Description JoinPath(java.lang.String path, Association[] associationPath, Join.Type joinType, java.lang.String alias)
Default constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Optional<java.lang.String>
getAlias()
The alias for the join path.Association
getAssociation()
Association[]
getAssociationPath()
Join.Type
getJoinType()
java.lang.String
getPath()
int
hashCode()
static JoinPath
of(Association... associationPath)
Create a join path from the association path.static JoinPath
of(java.lang.String alias, Association... associationPath)
Create a join path from the association path.java.lang.String
toString()
-
-
-
Constructor Detail
-
JoinPath
public JoinPath(@NonNull java.lang.String path, @NonNull Association[] associationPath, @NonNull Join.Type joinType, @Nullable java.lang.String alias)
Default constructor.- Parameters:
path
- The pathassociationPath
- The associationjoinType
- The join typealias
- The alias
-
-
Method Detail
-
getAlias
public java.util.Optional<java.lang.String> getAlias()
The alias for the join path.- Returns:
- The optional alias
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAssociation
@NonNull public Association getAssociation()
- Returns:
- The association
-
getAssociationPath
public Association[] getAssociationPath()
- Returns:
- The association path.
-
getPath
@NonNull public java.lang.String getPath()
- Returns:
- The association path
-
getJoinType
@NonNull public Join.Type getJoinType()
- Returns:
- The join type
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
of
public static JoinPath of(Association... associationPath)
Create a join path from the association path.- Parameters:
associationPath
- The association path- Returns:
- The join path
-
of
public static JoinPath of(java.lang.String alias, Association... associationPath)
Create a join path from the association path.- Parameters:
alias
- The alias to useassociationPath
- The association path- Returns:
- The join path
-
-