Package org.hibernate.spi
Class NavigablePath
- java.lang.Object
- org.hibernate.spi.NavigablePath
- All Implemented Interfaces:
Serializable,DotIdentifierSequence
- Direct Known Subclasses:
EntityIdentifierNavigablePath,TreatedNavigablePath
@Incubatingpublic classNavigablePathextendsObjectimplementsDotIdentifierSequence,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:
- Serialized Form
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceNavigablePath.FullPathCalculatorDeprecated, for removal: This API element is subject to removal in a future version.No longer usedprotected static classNavigablePath.RelativePathCollector
Field Summary
Fields Modifier and Type Field Description staticStringIDENTIFIER_MAPPER_PROPERTY
Constructor Summary
Constructors Constructor Description NavigablePath(@NullableNavigablePath parent,String localName, @NullableString alias,String identifierForTableGroup, int hashCode)NavigablePath(@NullableNavigablePath parent,String localName, @NullableString alias,String identifierForTableGroup,NavigablePath.FullPathCalculator fullPathCalculator, int hashCode)Deprecated, for removal: This API element is subject to removal in a future version.SinceNavigablePath.FullPathCalculatoris no longer usedNavigablePath(String localName)NavigablePath(String rootName, @NullableString alias)NavigablePath(NavigablePath parent,String navigableName)NavigablePath(NavigablePath parent,String localName, @NullableString alias)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description NavigablePathappend(String property)Append a new part to the end of this sequence, returning the new representation.NavigablePathappend(String property,String alias)protected staticStringcalculateIdMapperFullPath(@NullableNavigablePath parent,String localName, @NullableString alias)Deprecated, for removal: This API element is subject to removal in a future version.No longer usedprotected staticStringcalculateRootFullPath(@NullableNavigablePath parent,String rootName, @NullableString alias)Deprecated, for removal: This API element is subject to removal in a future version.No longer usedbooleanequals(@NullableObject other)@NullableStringgetAlias()StringgetFullPath()The full sequence text.StringgetIdentifierForTableGroup()StringgetLocalName()The name of this leaf sequence part.@NullableNavigablePathgetParent()The parent sequence part.@NullableNavigablePathgetRealParent()inthashCode()booleanisAliased()booleanisParent(@NullableNavigablePath navigablePath)Determine whether this path is part of the given path's parentbooleanisParentOrEqual(@NullableNavigablePath navigablePath)Determine whether this path is part of the given path's parentbooleanisSuffix(@NullableDotIdentifierSequence dotIdentifierSequence)Determine whether the given path is a suffix of this pathprotected booleanlocalNamesMatch(DotIdentifierSequence other)protected booleanlocalNamesMatch(EntityIdentifierNavigablePath other)booleanpathsMatch(@NullableNavigablePath p)@NullableStringrelativize(NavigablePath base)Ignores aliases in the resulting Stringprotected voidrelativize(NavigablePath base,NavigablePath.RelativePathCollector collector)StringtoString()NavigablePathtreatAs(String entityName)NavigablePathtreatAs(String entityName,String alias)@NullableNavigablePathtrimSuffix(@NullableDotIdentifierSequence 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 Detail
IDENTIFIER_MAPPER_PROPERTY
public static final String IDENTIFIER_MAPPER_PROPERTY
- See Also:
- Constant Field Values
Constructor Detail
NavigablePath
public NavigablePath(String localName)
NavigablePath
public NavigablePath(NavigablePath parent,String navigableName)
NavigablePath
public NavigablePath(NavigablePath parent,String localName, @NullableString alias)
NavigablePath
@Deprecated(since="6.6",forRemoval=true)public NavigablePath(@NullableNavigablePath parent,String localName, @NullableString alias,String identifierForTableGroup,NavigablePath.FullPathCalculator fullPathCalculator, int hashCode)
Deprecated, for removal: This API element is subject to removal in a future version.SinceNavigablePath.FullPathCalculatoris no longer used
NavigablePath
public NavigablePath(@NullableNavigablePath parent,String localName, @NullableString alias,String identifierForTableGroup, int hashCode)
Method Detail
getParent
public @NullableNavigablePath getParent()
Description copied from interface:DotIdentifierSequenceThe parent sequence part.Given the sequence
a.b.c, returns the sequencea.b.- Specified by:
getParentin interfaceDotIdentifierSequence
getLocalName
public String getLocalName()
Description copied from interface:DotIdentifierSequenceThe name of this leaf sequence part.Given the sequence
a.b.c, returns the string"c".- Specified by:
getLocalNamein interfaceDotIdentifierSequence
getAlias
public @NullableString getAlias()
isAliased
public boolean isAliased()
getIdentifierForTableGroup
public String getIdentifierForTableGroup()
localNamesMatch
protected boolean localNamesMatch(DotIdentifierSequence other)
localNamesMatch
protected boolean localNamesMatch(EntityIdentifierNavigablePath other)
append
public NavigablePath append(String property)
Description copied from interface:DotIdentifierSequenceAppend a new part to the end of this sequence, returning the new representation.Given the sequence
a.b.c, appendingdresults in the new sequencea.b.c.d.- Specified by:
appendin interfaceDotIdentifierSequence
append
public NavigablePath append(String property,String alias)
treatAs
public NavigablePath treatAs(String entityName)
treatAs
public NavigablePath treatAs(String entityName,String alias)
getRealParent
public @NullableNavigablePath getRealParent()
isParent
public boolean isParent(@NullableNavigablePath navigablePath)
Determine whether this path is part of the given path's parent
isSuffix
public boolean isSuffix(@NullableDotIdentifierSequence dotIdentifierSequence)
Determine whether the given path is a suffix of this path
trimSuffix
public @NullableNavigablePath trimSuffix(@NullableDotIdentifierSequence suffix)
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.
isParentOrEqual
public boolean isParentOrEqual(@NullableNavigablePath navigablePath)
Determine whether this path is part of the given path's parent
pathsMatch
public boolean pathsMatch(@NullableNavigablePath p)
relativize
public @NullableString relativize(NavigablePath base)
Ignores aliases in the resulting String
relativize
protected void relativize(NavigablePath base,NavigablePath.RelativePathCollector collector)
getFullPath
public String getFullPath()
Description copied from interface:DotIdentifierSequenceThe full sequence text.Given the sequence
a.b.c, returns the string"a.b.c".- Specified by:
getFullPathin interfaceDotIdentifierSequence
calculateRootFullPath
@Deprecated(since="6.6",forRemoval=true)protected static String calculateRootFullPath(@NullableNavigablePath parent,String rootName, @NullableString alias)
Deprecated, for removal: This API element is subject to removal in a future version.No longer usedThe pattern used for root NavigablePaths
calculateIdMapperFullPath
@Deprecated(since="6.6",forRemoval=true)protected static String calculateIdMapperFullPath(@NullableNavigablePath parent,String localName, @NullableString alias)
Deprecated, for removal: This API element is subject to removal in a future version.No longer usedPattern used for `_identifierMapper`