Package io.micronaut.data.model.query
Class JoinPath
- java.lang.Object
-
- io.micronaut.data.model.query.JoinPath
-
public class JoinPath extends java.lang.ObjectA 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 booleanequals(java.lang.Object o)java.util.Optional<java.lang.String>getAlias()The alias for the join path.AssociationgetAssociation()Association[]getAssociationPath()Join.TypegetJoinType()java.lang.StringgetPath()inthashCode()static JoinPathof(Association... associationPath)Create a join path from the association path.static JoinPathof(java.lang.String alias, Association... associationPath)Create a join path from the association path.java.lang.StringtoString()
-
-
-
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:
toStringin 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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
-
-