Class AttributeMapping
java.lang.Object
com.blazebit.persistence.view.impl.metamodel.AttributeMapping
- All Implemented Interfaces:
EntityViewAttributeMapping
- Direct Known Subclasses:
MethodAttributeMapping
,ParameterAttributeMapping
public abstract class AttributeMapping extends Object implements EntityViewAttributeMapping
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.spi.EntityViewAttributeMapping
EntityViewAttributeMapping.ContainerBehavior, EntityViewAttributeMapping.ElementCollectionBehavior
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AttributeMapping(ViewMapping viewMapping, Annotation mapping, MappingIndex mappingIndex, MetamodelBootContext context, boolean isCollection, PluralAttribute.ElementCollectionType elementCollectionType, Class<?> declaredTypeClass, Class<?> declaredKeyTypeClass, Class<?> declaredElementTypeClass, Type declaredType, Type declaredKeyType, Type declaredElementType, Map<Class<?>,String> inheritanceSubtypeClassMappings, Map<Class<?>,String> keyInheritanceSubtypeClassMappings, Map<Class<?>,String> elementInheritanceSubtypeClassMappings)
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.blazebit.persistence.view.spi.EntityViewAttributeMapping
getDeclaringView
-
Field Details
-
viewMapping
-
mapping
-
mappingIndex
-
context
-
isCollection
protected final boolean isCollection -
declaredTypeClass
-
declaredKeyTypeClass
-
declaredElementTypeClass
-
declaredType
-
declaredKeyType
-
declaredElementType
-
inheritanceSubtypeClassMappings
-
keyInheritanceSubtypeClassMappings
-
elementInheritanceSubtypeClassMappings
-
containerBehavior
-
comparatorClass
-
forceUniqueness
protected boolean forceUniqueness -
disallowOwnedUpdatableSubview
-
elementCollectionBehavior
-
elementCollectionComparatorClass
-
elementCollectionForceUniqueness
protected boolean elementCollectionForceUniqueness -
defaultBatchSize
-
createEmptyFlatViews
-
limitExpression
-
offsetExpression
-
orderByItems
-
resolvedTypeMappings
protected boolean resolvedTypeMappings -
possibleTargets
-
possibleIndexTargets
-
elementCollectionType
-
type
-
keyType
-
elementType
-
typeMapping
-
keyViewMapping
-
elementViewMapping
-
embeddableTypeMap
-
embeddableKeyTypeMap
-
embeddableElementTypeMap
-
inheritanceSubtypeMappings
-
keyInheritanceSubtypeMappings
-
elementInheritanceSubtypeMappings
-
inheritanceSubtypes
-
keyInheritanceSubtypes
-
elementInheritanceSubtypes
-
embeddableInheritanceSubtypesMap
protected Map<EmbeddableOwner,Map<ManagedViewTypeImplementor<?>,String>> embeddableInheritanceSubtypesMap -
embeddableKeyInheritanceSubtypesMap
protected Map<EmbeddableOwner,Map<ManagedViewTypeImplementor<?>,String>> embeddableKeyInheritanceSubtypesMap -
embeddableElementInheritanceSubtypesMap
protected Map<EmbeddableOwner,Map<ManagedViewTypeImplementor<?>,String>> embeddableElementInheritanceSubtypesMap -
attribute
-
embeddableAttributeMap
-
-
Constructor Details
-
AttributeMapping
public AttributeMapping(ViewMapping viewMapping, Annotation mapping, MappingIndex mappingIndex, MetamodelBootContext context, boolean isCollection, PluralAttribute.ElementCollectionType elementCollectionType, Class<?> declaredTypeClass, Class<?> declaredKeyTypeClass, Class<?> declaredElementTypeClass, Type declaredType, Type declaredKeyType, Type declaredElementType, Map<Class<?>,String> inheritanceSubtypeClassMappings, Map<Class<?>,String> keyInheritanceSubtypeClassMappings, Map<Class<?>,String> elementInheritanceSubtypeClassMappings)
-
-
Method Details
-
getMapping
-
getMappingIndex
-
getKeyViewMapping
-
getElementViewMapping
-
isId
public abstract boolean isId() -
isVersion
public abstract boolean isVersion() -
isCollection
public boolean isCollection()- Specified by:
isCollection
in interfaceEntityViewAttributeMapping
-
getContainerBehavior
- Specified by:
getContainerBehavior
in interfaceEntityViewAttributeMapping
-
setContainerDefault
public void setContainerDefault()- Specified by:
setContainerDefault
in interfaceEntityViewAttributeMapping
-
setContainerIndexed
public void setContainerIndexed()- Specified by:
setContainerIndexed
in interfaceEntityViewAttributeMapping
-
setContainerOrdered
public void setContainerOrdered()- Specified by:
setContainerOrdered
in interfaceEntityViewAttributeMapping
-
setContainerSorted
- Specified by:
setContainerSorted
in interfaceEntityViewAttributeMapping
-
isForceUniqueness
public boolean isForceUniqueness()- Specified by:
isForceUniqueness
in interfaceEntityViewAttributeMapping
-
setForceUniqueness
public void setForceUniqueness(boolean forceUniqueness)- Specified by:
setForceUniqueness
in interfaceEntityViewAttributeMapping
-
getElementCollectionBehavior
- Specified by:
getElementCollectionBehavior
in interfaceEntityViewAttributeMapping
-
setElementCollectionDefault
public void setElementCollectionDefault()- Specified by:
setElementCollectionDefault
in interfaceEntityViewAttributeMapping
-
setElementCollectionOrdered
public void setElementCollectionOrdered()- Specified by:
setElementCollectionOrdered
in interfaceEntityViewAttributeMapping
-
setElementCollectionSorted
- Specified by:
setElementCollectionSorted
in interfaceEntityViewAttributeMapping
-
isElementCollectionForceUniqueness
public boolean isElementCollectionForceUniqueness()- Specified by:
isElementCollectionForceUniqueness
in interfaceEntityViewAttributeMapping
-
setElementCollectionForceUniqueness
public void setElementCollectionForceUniqueness(boolean forceUniqueness)- Specified by:
setElementCollectionForceUniqueness
in interfaceEntityViewAttributeMapping
-
getElementCollectionComparatorClass
- Specified by:
getElementCollectionComparatorClass
in interfaceEntityViewAttributeMapping
-
isDisallowOwnedUpdatableSubview
public boolean isDisallowOwnedUpdatableSubview()- Specified by:
isDisallowOwnedUpdatableSubview
in interfaceEntityViewAttributeMapping
-
setDisallowOwnedUpdatableSubview
public void setDisallowOwnedUpdatableSubview(boolean disallowOwnedUpdatableSubview)- Specified by:
setDisallowOwnedUpdatableSubview
in interfaceEntityViewAttributeMapping
-
getComparatorClass
- Specified by:
getComparatorClass
in interfaceEntityViewAttributeMapping
-
getDefaultBatchSize
- Specified by:
getDefaultBatchSize
in interfaceEntityViewAttributeMapping
-
setDefaultBatchSize
- Specified by:
setDefaultBatchSize
in interfaceEntityViewAttributeMapping
-
getLimitExpression
- Specified by:
getLimitExpression
in interfaceEntityViewAttributeMapping
-
getOffsetExpression
- Specified by:
getOffsetExpression
in interfaceEntityViewAttributeMapping
-
getOrderByItems
- Specified by:
getOrderByItems
in interfaceEntityViewAttributeMapping
-
setLimit
public void setLimit(String limitExpression, String offsetExpression, List<String> orderByExpressions)- Specified by:
setLimit
in interfaceEntityViewAttributeMapping
-
getCreateEmptyFlatViews
- Specified by:
getCreateEmptyFlatViews
in interfaceEntityViewAttributeMapping
-
setCreateEmptyFlatViews
- Specified by:
setCreateEmptyFlatViews
in interfaceEntityViewAttributeMapping
-
getErrorLocation
-
getMappedBy
-
getInverseRemoveStrategy
-
isSorted
public boolean isSorted() -
determineDisallowOwnedUpdatableSubview
public abstract boolean determineDisallowOwnedUpdatableSubview(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping, javax.persistence.metamodel.Attribute<?,?> updateMappableAttribute) -
determineMappedBy
public abstract String determineMappedBy(javax.persistence.metamodel.ManagedType<?> managedType, String mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
determineWritableMappedByMappings
public abstract Map<String,String> determineWritableMappedByMappings(javax.persistence.metamodel.ManagedType<?> managedType, String mappedBy, MetamodelBuildingContext context) -
determineIndexed
public boolean determineIndexed(MetamodelBuildingContext context, javax.persistence.metamodel.ManagedType<?> managedType) -
getDeclaredType
- Specified by:
getDeclaredType
in interfaceEntityViewAttributeMapping
-
getDeclaredKeyType
- Specified by:
getDeclaredKeyType
in interfaceEntityViewAttributeMapping
-
getDeclaredElementType
- Specified by:
getDeclaredElementType
in interfaceEntityViewAttributeMapping
-
getElementCollectionType
-
getJavaType
-
getPossibleTargetTypes
public List<ScalarTargetResolvingExpressionVisitor.TargetType> getPossibleTargetTypes(MetamodelBuildingContext context) -
getPossibleIndexTargetTypes
public List<ScalarTargetResolvingExpressionVisitor.TargetType> getPossibleIndexTargetTypes(MetamodelBuildingContext context) -
getBaseTypes
public Set<Class<?>> getBaseTypes(List<ScalarTargetResolvingExpressionVisitor.TargetType> possibleTargetTypes) -
getKeyTypes
public Set<Class<?>> getKeyTypes(List<ScalarTargetResolvingExpressionVisitor.TargetType> possibleTargetTypes) -
getElementTypes
public Set<Class<?>> getElementTypes(List<ScalarTargetResolvingExpressionVisitor.TargetType> possibleTargetTypes) -
getType
-
getKeyType
-
getElementType
-
getInheritanceSubtypes
public Map<ManagedViewTypeImplementor<?>,String> getInheritanceSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getKeyInheritanceSubtypes
public Map<ManagedViewTypeImplementor<?>,String> getKeyInheritanceSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getElementInheritanceSubtypes
public Map<ManagedViewTypeImplementor<?>,String> getElementInheritanceSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
initializeViewMappings
-
validateDependencies
public boolean validateDependencies(MetamodelBuildingContext context, Set<Class<?>> dependencies, boolean reportError) -
circularDependencyError
-
circularDependencyDebug
-
unknownSubviewType
-