Class MethodAttributeMapping
java.lang.Object
com.blazebit.persistence.view.impl.metamodel.AttributeMapping
com.blazebit.persistence.view.impl.metamodel.MethodAttributeMapping
- All Implemented Interfaces:
EntityViewAttributeMapping
,EntityViewMethodAttributeMapping
public class MethodAttributeMapping extends AttributeMapping implements EntityViewMethodAttributeMapping
- 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
Fields inherited from class com.blazebit.persistence.view.impl.metamodel.AttributeMapping
attribute, comparatorClass, containerBehavior, context, createEmptyFlatViews, declaredElementType, declaredElementTypeClass, declaredKeyType, declaredKeyTypeClass, declaredType, declaredTypeClass, defaultBatchSize, disallowOwnedUpdatableSubview, elementCollectionBehavior, elementCollectionComparatorClass, elementCollectionForceUniqueness, elementCollectionType, elementInheritanceSubtypeClassMappings, elementInheritanceSubtypeMappings, elementInheritanceSubtypes, elementType, elementViewMapping, embeddableAttributeMap, embeddableElementInheritanceSubtypesMap, embeddableElementTypeMap, embeddableInheritanceSubtypesMap, embeddableKeyInheritanceSubtypesMap, embeddableKeyTypeMap, embeddableTypeMap, forceUniqueness, inheritanceSubtypeClassMappings, inheritanceSubtypeMappings, inheritanceSubtypes, isCollection, keyInheritanceSubtypeClassMappings, keyInheritanceSubtypeMappings, keyInheritanceSubtypes, keyType, keyViewMapping, limitExpression, mapping, mappingIndex, offsetExpression, orderByItems, possibleIndexTargets, possibleTargets, resolvedTypeMappings, type, typeMapping, viewMapping
-
Constructor Summary
Constructors Constructor Description MethodAttributeMapping(ViewMapping viewMapping, Annotation mapping, MappingIndex mappingIndex, MetamodelBootContext context, String attributeName, Method method, int attributeIndex, boolean isCollection, PluralAttribute.ElementCollectionType elementCollectionType, Class<?> declaredTypeClass, Class<?> declaredKeyTypeClass, Class declaredElementTypeClass, Type type, Type keyType, Type elementType, Map<Class<?>,String> inheritanceSubtypeClassMappings, Map<Class<?>,String> keyInheritanceSubtypeClassMappings, Map<Class<?>,String> elementInheritanceSubtypeClassMappings)
-
Method Summary
Methods inherited from class com.blazebit.persistence.view.impl.metamodel.AttributeMapping
circularDependencyDebug, circularDependencyError, determineIndexed, getBaseTypes, getComparatorClass, getContainerBehavior, getCreateEmptyFlatViews, getDeclaredElementType, getDeclaredKeyType, getDeclaredType, getDefaultBatchSize, getElementCollectionBehavior, getElementCollectionComparatorClass, getElementCollectionType, getElementInheritanceSubtypes, getElementType, getElementTypes, getElementViewMapping, getInheritanceSubtypes, getJavaType, getKeyInheritanceSubtypes, getKeyType, getKeyTypes, getKeyViewMapping, getLimitExpression, getMapping, getMappingIndex, getOffsetExpression, getOrderByItems, getPossibleIndexTargetTypes, getPossibleTargetTypes, getType, isCollection, isDisallowOwnedUpdatableSubview, isElementCollectionForceUniqueness, isForceUniqueness, isSorted, setContainerDefault, setContainerIndexed, setContainerOrdered, setContainerSorted, setCreateEmptyFlatViews, setDefaultBatchSize, setDisallowOwnedUpdatableSubview, setElementCollectionDefault, setElementCollectionForceUniqueness, setElementCollectionOrdered, setElementCollectionSorted, setForceUniqueness, setLimit, unknownSubviewType
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
getComparatorClass, getContainerBehavior, getCreateEmptyFlatViews, getDeclaredElementType, getDeclaredKeyType, getDeclaredType, getDefaultBatchSize, getElementCollectionBehavior, getElementCollectionComparatorClass, getLimitExpression, getOffsetExpression, getOrderByItems, isCollection, isDisallowOwnedUpdatableSubview, isElementCollectionForceUniqueness, isForceUniqueness, setContainerDefault, setContainerIndexed, setContainerOrdered, setContainerSorted, setCreateEmptyFlatViews, setDefaultBatchSize, setDisallowOwnedUpdatableSubview, setElementCollectionDefault, setElementCollectionForceUniqueness, setElementCollectionOrdered, setElementCollectionSorted, setForceUniqueness, setLimit
-
Constructor Details
-
MethodAttributeMapping
public MethodAttributeMapping(ViewMapping viewMapping, Annotation mapping, MappingIndex mappingIndex, MetamodelBootContext context, String attributeName, Method method, int attributeIndex, boolean isCollection, PluralAttribute.ElementCollectionType elementCollectionType, Class<?> declaredTypeClass, Class<?> declaredKeyTypeClass, Class declaredElementTypeClass, Type type, Type keyType, Type elementType, Map<Class<?>,String> inheritanceSubtypeClassMappings, Map<Class<?>,String> keyInheritanceSubtypeClassMappings, Map<Class<?>,String> elementInheritanceSubtypeClassMappings)
-
-
Method Details
-
getDeclaringView
- Specified by:
getDeclaringView
in interfaceEntityViewAttributeMapping
-
getName
- Specified by:
getName
in interfaceEntityViewMethodAttributeMapping
-
getMethod
- Specified by:
getMethod
in interfaceEntityViewMethodAttributeMapping
-
getSetterMethod
-
getAttributeIndex
public int getAttributeIndex() -
getUpdatable
- Specified by:
getUpdatable
in interfaceEntityViewMethodAttributeMapping
-
getOrphanRemoval
- Specified by:
getOrphanRemoval
in interfaceEntityViewMethodAttributeMapping
-
getOptimisticLockProtected
-
isId
public boolean isId()- Specified by:
isId
in classAttributeMapping
-
isVersion
public boolean isVersion()- Specified by:
isVersion
in classAttributeMapping
-
getCascadeTypes
- Specified by:
getCascadeTypes
in interfaceEntityViewMethodAttributeMapping
-
setUpdatable
public void setUpdatable(boolean updatable, boolean orphanRemoval, CascadeType[] cascadeTypes, Class<?>[] subtypes, Class<?>[] persistSubtypes, Class<?>[] updateSubtypes)- Specified by:
setUpdatable
in interfaceEntityViewMethodAttributeMapping
-
setOptimisticLockProtected
-
getMappedBy
- Specified by:
getMappedBy
in interfaceEntityViewMethodAttributeMapping
- Specified by:
getMappedBy
in classAttributeMapping
-
setMappedBy
- Specified by:
setMappedBy
in interfaceEntityViewMethodAttributeMapping
-
getInverseRemoveStrategy
- Specified by:
getInverseRemoveStrategy
in interfaceEntityViewMethodAttributeMapping
- Specified by:
getInverseRemoveStrategy
in classAttributeMapping
-
setInverseRemoveStrategy
- Specified by:
setInverseRemoveStrategy
in interfaceEntityViewMethodAttributeMapping
-
getAttributeFilterProviders
- Specified by:
getAttributeFilterProviders
in interfaceEntityViewMethodAttributeMapping
-
setAttributeFilterProviders
public void setAttributeFilterProviders(Map<String,Class<? extends AttributeFilterProvider<?>>> attributeFilterProviders)- Specified by:
setAttributeFilterProviders
in interfaceEntityViewMethodAttributeMapping
-
getReadOnlySubtypes
public Set<ManagedViewTypeImplementor<?>> getReadOnlySubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getCascadeSubtypes
public Set<ManagedViewTypeImplementor<?>> getCascadeSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getCascadePersistSubtypes
public Set<ManagedViewTypeImplementor<?>> getCascadePersistSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getCascadeUpdateSubtypes
public Set<ManagedViewTypeImplementor<?>> getCascadeUpdateSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) -
getErrorLocation
- Specified by:
getErrorLocation
in classAttributeMapping
-
getLocation
-
hasExplicitCascades
public boolean hasExplicitCascades() -
initializeViewMappings
- Overrides:
initializeViewMappings
in classAttributeMapping
-
validateDependencies
public boolean validateDependencies(MetamodelBuildingContext context, Set<Class<?>> dependencies, boolean reportError)- Overrides:
validateDependencies
in classAttributeMapping
-
determineDisallowOwnedUpdatableSubview
public boolean determineDisallowOwnedUpdatableSubview(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping, javax.persistence.metamodel.Attribute<?,?> updateMappableAttribute)- Specified by:
determineDisallowOwnedUpdatableSubview
in classAttributeMapping
-
determineMappedBy
public String determineMappedBy(javax.persistence.metamodel.ManagedType<?> managedType, String mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping)- Specified by:
determineMappedBy
in classAttributeMapping
-
determineWritableMappedByMappings
public Map<String,String> determineWritableMappedByMappings(javax.persistence.metamodel.ManagedType<?> managedType, String mappedBy, MetamodelBuildingContext context)- Specified by:
determineWritableMappedByMappings
in classAttributeMapping
-
handleReplacement
-
getMethodAttribute
public <X> AbstractMethodAttribute<? super X,?> getMethodAttribute(ManagedViewTypeImplementor<X> viewType, int attributeIndex, int dirtyStateIndex, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping)
-