Package org.hibernate.spi
Class NavigablePath
java.lang.Object
org.hibernate.spi.NavigablePath
- All Implemented Interfaces:
Serializable
,DotIdentifierSequence
- Direct Known Subclasses:
EntityIdentifierNavigablePath
,TreatedNavigablePath
@Incubating
public class NavigablePath
extends Object
implements DotIdentifierSequence, Serializable
A compound name where the root path element is an entity name or a collection role
and each the path sub-path from the root references a domain or mapping model part
relative to a root path.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
Deprecated, for removal: This API element is subject to removal in a future version.No longer usedprotected static class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNavigablePath
(@Nullable NavigablePath parent, String localName, @Nullable String alias, String identifierForTableGroup, int hashCode) NavigablePath
(@Nullable NavigablePath parent, String localName, @Nullable String alias, String identifierForTableGroup, NavigablePath.FullPathCalculator fullPathCalculator, int hashCode) Deprecated, for removal: This API element is subject to removal in a future version.SinceNavigablePath.FullPathCalculator
is no longer usedNavigablePath
(String localName) NavigablePath
(String rootName, @Nullable String alias) NavigablePath
(NavigablePath parent, String navigableName) NavigablePath
(NavigablePath parent, String localName, @Nullable String alias) -
Method Summary
Modifier and TypeMethodDescriptionAppend a new part to the end of this sequence, returning the new representation.protected static String
calculateIdMapperFullPath
(@Nullable NavigablePath parent, String localName, @Nullable String alias) Deprecated, for removal: This API element is subject to removal in a future version.No longer usedprotected static String
calculateRootFullPath
(@Nullable NavigablePath parent, String rootName, @Nullable String alias) Deprecated, for removal: This API element is subject to removal in a future version.No longer usedboolean
@Nullable String
getAlias()
The full sequence text.The name of this leaf sequence part.@Nullable NavigablePath
The parent sequence part.@Nullable NavigablePath
int
hashCode()
boolean
boolean
isParent
(@Nullable NavigablePath navigablePath) Determine whether this path is part of the given path's parentboolean
isParentOrEqual
(@Nullable NavigablePath navigablePath) Determine whether this path is part of the given path's parentboolean
isSuffix
(@Nullable DotIdentifierSequence dotIdentifierSequence) Determine whether the given path is a suffix of this pathprotected boolean
protected boolean
boolean
pathsMatch
(@Nullable NavigablePath p) @Nullable String
relativize
(NavigablePath base) Ignores aliases in the resulting Stringprotected void
relativize
(NavigablePath base, NavigablePath.RelativePathCollector collector) toString()
@Nullable NavigablePath
trimSuffix
(@Nullable DotIdentifierSequence suffix) Removes the suffix part from the NavigablePath, when the NavigablePath does not contain the suffix it returns null;Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.spi.DotIdentifierSequence
getParts, isRoot
-
Field Details
-
IDENTIFIER_MAPPER_PROPERTY
- See Also:
-
-
Constructor Details
-
NavigablePath
-
NavigablePath
-
-
Method Details
-
getParent
Description copied from interface:DotIdentifierSequence
The parent sequence part.Given the sequence
a.b.c
, returns the sequencea.b
.- Specified by:
getParent
in interfaceDotIdentifierSequence
-
getLocalName
Description copied from interface:DotIdentifierSequence
The name of this leaf sequence part.Given the sequence
a.b.c
, returns the string"c"
.- Specified by:
getLocalName
in interfaceDotIdentifierSequence
-
getAlias
-
isAliased
public boolean isAliased() -
getIdentifierForTableGroup
-
hashCode
public int hashCode() -
equals
-
localNamesMatch
-
append
Description copied from interface:DotIdentifierSequence
Append a new part to the end of this sequence, returning the new representation.Given the sequence
a.b.c
, appendingd
results in the new sequencea.b.c.d
.- Specified by:
append
in interfaceDotIdentifierSequence
-
append
-
treatAs
-
treatAs
-
getRealParent
-
isSuffix
Determine whether the given path is a suffix of this path -
trimSuffix
Removes the suffix part from the NavigablePath, when the NavigablePath does not contain the suffix it returns null;- Parameters:
suffix
- the part to remove from the NavigablePath- Returns:
- the NavigablePath stripped of the suffix part or null if the NavigablePath does not contain the suffix.
-
getFullPath
Description copied from interface:DotIdentifierSequence
The full sequence text.Given the sequence
a.b.c
, returns the string"a.b.c"
.- Specified by:
getFullPath
in interfaceDotIdentifierSequence
-
toString
-