Interface EntityViewMethodAttributeMapping

All Superinterfaces:
EntityViewAttributeMapping

public interface EntityViewMethodAttributeMapping
extends EntityViewAttributeMapping
Mapping of an entity view method attribute.
Since:
1.2.0
Author:
Christian Beikov
  • 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. If null(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. If null(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 updatable
      orphanRemoval - Whether orphaned objects should be deleted
      cascadeTypes - The enabled cascade types
      subtypes - The allowed subtypes for both, persist and update cascades
      persistSubtypes - The allowed subtypes for persist cascades
      updateSubtypes - The allowed subtypes for update cascades
    • getMappedBy

      String getMappedBy()
      Returns the mapping to the inverse attribute relative to the element type or null if there is none.
      Returns:
      The mapping to the inverse attribute
    • setMappedBy

      void setMappedBy​(String mappedBy)
      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. Returns InverseRemoveStrategy.SET_NULL by default.
      Returns:
      the inverse remove strategy
    • setInverseRemoveStrategy

      void setInverseRemoveStrategy​(InverseRemoveStrategy inverseRemoveStrategy)
      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