Class TreatResolver
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
-
- org.eclipse.persistence.jpa.jpql.tools.resolver.TreatResolver
-
-
Constructor Summary
Constructors Constructor Description TreatResolver(Resolver parent, String entityTypeName)Creates a newTreatResolver.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ITypeDeclarationbuildTypeDeclaration()Resolves theITypeDeclarationof the property handled by thisResolver.StringgetEntityTypeName()Returns the entity type name used to downcast the path expression.IManagedTypegetManagedType()Returns theIManagedTypeassociated with the field handled by thisResolver.voidsetNullAllowed(boolean nullAllowed)Sets whether theExpressionto be created, which wraps the attribute or query key name allows the target of the 1:1 relationship to benullif there is no corresponding relationship in the database.StringtoString()-
Methods inherited from class org.eclipse.persistence.jpa.jpql.tools.resolver.Resolver
addChild, buildType, checkParent, getChild, getMapping, getParent, getParentManagedType, getParentMapping, getParentType, getParentTypeDeclaration, getProvider, getQuery, getType, getType, getType, getTypeDeclaration, getTypeHelper, getTypeRepository, isNullAllowed
-
-
-
-
Method Detail
-
buildTypeDeclaration
protected ITypeDeclaration buildTypeDeclaration()
Description copied from class:ResolverResolves theITypeDeclarationof the property handled by thisResolver.- Specified by:
buildTypeDeclarationin classResolver- Returns:
- Either the
ITypeDeclarationthat was resolved by thisResolveror theITypeDeclarationforIType.UNRESOLVABLE_TYPEif it could not be resolved
-
getEntityTypeName
public String getEntityTypeName()
Returns the entity type name used to downcast the path expression.- Returns:
- The entity type name used to downcast the path expression
-
getManagedType
public IManagedType getManagedType()
Description copied from class:ResolverReturns theIManagedTypeassociated with the field handled by thisResolver. If thisResolverdoes not handle a field that has aIManagedType, thennullshould be returned.For example: "
SELECT e FROM Employee e", theResolverfor e would be returning theIManagedTypefor Employee.- Overrides:
getManagedTypein classResolver- Returns:
- Either the
IManagedType, if it could be resolved;nullotherwise
-
setNullAllowed
public void setNullAllowed(boolean nullAllowed)
Description copied from class:ResolverSets whether theExpressionto be created, which wraps the attribute or query key name allows the target of the 1:1 relationship to benullif there is no corresponding relationship in the database.- Overrides:
setNullAllowedin classResolver- Parameters:
nullAllowed-trueto allownullif the corresponding relationship in the database does not exists;falseotherwise
-
-