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
ConstructorsConstructorDescriptionMethodAttributeMapping(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
Modifier and TypeMethodDescriptionbooleandetermineDisallowOwnedUpdatableSubview(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping, javax.persistence.metamodel.Attribute<?, ?> updateMappableAttribute) determineMappedBy(javax.persistence.metamodel.ManagedType<?> managedType, String mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) determineWritableMappedByMappings(javax.persistence.metamodel.ManagedType<?> managedType, String mappedBy, MetamodelBuildingContext context) Map<String,Class<? extends AttributeFilterProvider<?>>> intgetCascadePersistSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) getCascadeSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) getCascadeUpdateSubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) static StringgetLocation(String attributeName, Method method) <X> AbstractMethodAttribute<? super X,?> getMethodAttribute(ManagedViewTypeImplementor<X> viewType, int attributeIndex, int dirtyStateIndex, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) getName()getReadOnlySubtypes(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) handleReplacement(AttributeMapping original) booleanvoidbooleanisId()booleanvoidsetAttributeFilterProviders(Map<String, Class<? extends AttributeFilterProvider<?>>> attributeFilterProviders) voidsetInverseRemoveStrategy(InverseRemoveStrategy inverseRemoveStrategy) voidsetMappedBy(String mappedBy) voidsetOptimisticLockProtected(Boolean optimisticLockProtected) voidsetUpdatable(boolean updatable, boolean orphanRemoval, CascadeType[] cascadeTypes, Class<?>[] subtypes, Class<?>[] persistSubtypes, Class<?>[] updateSubtypes) booleanvalidateDependencies(MetamodelBuildingContext context, Set<Class<?>> dependencies, boolean reportError) 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, unknownSubviewTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getDeclaringViewin interfaceEntityViewAttributeMapping
-
getName
- Specified by:
getNamein interfaceEntityViewMethodAttributeMapping
-
getMethod
- Specified by:
getMethodin interfaceEntityViewMethodAttributeMapping
-
getSetterMethod
-
getAttributeIndex
public int getAttributeIndex() -
getUpdatable
- Specified by:
getUpdatablein interfaceEntityViewMethodAttributeMapping
-
getOrphanRemoval
- Specified by:
getOrphanRemovalin interfaceEntityViewMethodAttributeMapping
-
getOptimisticLockProtected
-
isId
public boolean isId()- Specified by:
isIdin classAttributeMapping
-
isVersion
public boolean isVersion()- Specified by:
isVersionin classAttributeMapping
-
getCascadeTypes
- Specified by:
getCascadeTypesin interfaceEntityViewMethodAttributeMapping
-
setUpdatable
public void setUpdatable(boolean updatable, boolean orphanRemoval, CascadeType[] cascadeTypes, Class<?>[] subtypes, Class<?>[] persistSubtypes, Class<?>[] updateSubtypes) - Specified by:
setUpdatablein interfaceEntityViewMethodAttributeMapping
-
setOptimisticLockProtected
-
getMappedBy
- Specified by:
getMappedByin interfaceEntityViewMethodAttributeMapping- Specified by:
getMappedByin classAttributeMapping
-
setMappedBy
- Specified by:
setMappedByin interfaceEntityViewMethodAttributeMapping
-
getInverseRemoveStrategy
- Specified by:
getInverseRemoveStrategyin interfaceEntityViewMethodAttributeMapping- Specified by:
getInverseRemoveStrategyin classAttributeMapping
-
setInverseRemoveStrategy
- Specified by:
setInverseRemoveStrategyin interfaceEntityViewMethodAttributeMapping
-
getAttributeFilterProviders
- Specified by:
getAttributeFilterProvidersin interfaceEntityViewMethodAttributeMapping
-
setAttributeFilterProviders
public void setAttributeFilterProviders(Map<String, Class<? extends AttributeFilterProvider<?>>> attributeFilterProviders) - Specified by:
setAttributeFilterProvidersin 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:
getErrorLocationin classAttributeMapping
-
getLocation
-
hasExplicitCascades
public boolean hasExplicitCascades() -
initializeViewMappings
- Overrides:
initializeViewMappingsin classAttributeMapping
-
validateDependencies
public boolean validateDependencies(MetamodelBuildingContext context, Set<Class<?>> dependencies, boolean reportError) - Overrides:
validateDependenciesin classAttributeMapping
-
determineDisallowOwnedUpdatableSubview
public boolean determineDisallowOwnedUpdatableSubview(MetamodelBuildingContext context, EmbeddableOwner embeddableMapping, javax.persistence.metamodel.Attribute<?, ?> updateMappableAttribute) - Specified by:
determineDisallowOwnedUpdatableSubviewin classAttributeMapping
-
determineMappedBy
public String determineMappedBy(javax.persistence.metamodel.ManagedType<?> managedType, String mapping, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping) - Specified by:
determineMappedByin classAttributeMapping
-
determineWritableMappedByMappings
public Map<String,String> determineWritableMappedByMappings(javax.persistence.metamodel.ManagedType<?> managedType, String mappedBy, MetamodelBuildingContext context) - Specified by:
determineWritableMappedByMappingsin classAttributeMapping
-
handleReplacement
-
getMethodAttribute
public <X> AbstractMethodAttribute<? super X,?> getMethodAttribute(ManagedViewTypeImplementor<X> viewType, int attributeIndex, int dirtyStateIndex, MetamodelBuildingContext context, EmbeddableOwner embeddableMapping)
-