Interface EntityViewMethodAttributeMapping
- All Superinterfaces:
EntityViewAttributeMapping
public interface EntityViewMethodAttributeMapping extends EntityViewAttributeMapping
Mapping of an entity view method attribute.
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.spi.EntityViewAttributeMapping
EntityViewAttributeMapping.ContainerBehavior
-
Method Summary
Modifier and Type Method Description Map<String,Class<? extends AttributeFilterProvider<?>>>
getAttributeFilterProviders()
Returns the attribute filter providers.Set<CascadeType>
getCascadeTypes()
Returns the cascade types that are configured for this attribute.InverseRemoveStrategy
getInverseRemoveStrategy()
Returns the inverse remove strategy to use if this is an inverse mapping.String
getMappedBy()
Returns the mapping to the inverse attribute relative to the element type ornull
if there is none.Method
getMethod()
Returns the getter method represented by this attribute mapping.String
getName()
Returns the name of this attribute.Boolean
getOrphanRemoval()
Returns whether the elements that are removed from the attribute should be deleted.Boolean
getUpdatable()
Returns whether the attribute is updatable i.e. the JPA attribute to which the attribute is mapped via the mapping is updatable.void
setAttributeFilterProviders(Map<String,Class<? extends AttributeFilterProvider<?>>> attributeFilterProviders)
Sets the attribute filter providers.void
setInverseRemoveStrategy(InverseRemoveStrategy inverseRemoveStrategy)
Sets the inverse remove strategy.void
setMappedBy(String mappedBy)
Set the mapping to the inverse attribute.void
setUpdatable(boolean updatable, boolean orphanRemoval, CascadeType[] cascadeTypes, Class<?>[] subtypes, Class<?>[] persistSubtypes, Class<?>[] updateSubtypes)
Set whether the attribute is updatable along with cascading configuration and the allowed subtypes.Methods inherited from interface com.blazebit.persistence.view.spi.EntityViewAttributeMapping
getComparatorClass, getContainerBehavior, getCreateEmptyFlatViews, getDeclaredElementType, getDeclaredKeyType, getDeclaredType, getDeclaringView, getDefaultBatchSize, getLimitExpression, getOffsetExpression, getOrderByItems, isCollection, isDisallowOwnedUpdatableSubview, isForceUniqueness, setContainerDefault, setContainerIndexed, setContainerOrdered, setContainerSorted, setCreateEmptyFlatViews, setDefaultBatchSize, setDisallowOwnedUpdatableSubview, setForceUniqueness, setLimit
-
Method Details
-
getName
String getName()Returns the name of this attribute.- Returns:
- The attribute name
-
getMethod
Method getMethod()Returns the getter method represented by this attribute mapping.- Returns:
- The getter method represented by this attribute mapping
-
getUpdatable
Boolean getUpdatable()Returns whether the attribute is updatable i.e. the JPA attribute to which the attribute is mapped via the mapping is updatable. Ifnull
(the default), whether the attribute is updatable is determined during the building phase(EntityViewConfiguration.createEntityViewManager(CriteriaBuilderFactory)
).- Returns:
- Whether the attribute is updatable or
null
if updatability should be determined during building phase
-
getOrphanRemoval
Boolean getOrphanRemoval()Returns whether the elements that are removed from the attribute should be deleted. Ifnull
(the default), whether the attribute is updatable is determined during the building phase(EntityViewConfiguration.createEntityViewManager(CriteriaBuilderFactory)
).- Returns:
- Whether the attribute should do orphan removal or
null
if that should be determined during building phase
-
getCascadeTypes
Set<CascadeType> getCascadeTypes()Returns the cascade types that are configured for this attribute.- Returns:
- The cascade types
-
setUpdatable
void setUpdatable(boolean updatable, boolean orphanRemoval, CascadeType[] cascadeTypes, Class<?>[] subtypes, Class<?>[] persistSubtypes, Class<?>[] updateSubtypes)Set whether the attribute is updatable along with cascading configuration and the allowed subtypes.- Parameters:
updatable
- Whether the attribute should be updatableorphanRemoval
- Whether orphaned objects should be deletedcascadeTypes
- The enabled cascade typessubtypes
- The allowed subtypes for both, persist and update cascadespersistSubtypes
- The allowed subtypes for persist cascadesupdateSubtypes
- The allowed subtypes for update cascades
-
getMappedBy
String getMappedBy()Returns the mapping to the inverse attribute relative to the element type ornull
if there is none.- Returns:
- The mapping to the inverse attribute
-
setMappedBy
Set the mapping to the inverse attribute.- Parameters:
mappedBy
- The mapping
-
getInverseRemoveStrategy
InverseRemoveStrategy getInverseRemoveStrategy()Returns the inverse remove strategy to use if this is an inverse mapping. ReturnsInverseRemoveStrategy.SET_NULL
by default.- Returns:
- the inverse remove strategy
-
setInverseRemoveStrategy
Sets the inverse remove strategy.- Parameters:
inverseRemoveStrategy
- The strategy
-
getAttributeFilterProviders
Map<String,Class<? extends AttributeFilterProvider<?>>> getAttributeFilterProviders()Returns the attribute filter providers.- Returns:
- The attribute filter providers
- Since:
- 1.5.0
-
setAttributeFilterProviders
void setAttributeFilterProviders(Map<String,Class<? extends AttributeFilterProvider<?>>> attributeFilterProviders)Sets the attribute filter providers.- Parameters:
attributeFilterProviders
- The attribute filter providers- Since:
- 1.5.0
-