Interface EntityViewAttributeMapping

All Known Subinterfaces:
EntityViewMethodAttributeMapping, EntityViewParameterMapping

public interface EntityViewAttributeMapping
Mapping of an entity view attribute.
Since:
1.2.0
Author:
Christian Beikov
  • Method Details

    • getDeclaringView

      EntityViewMapping getDeclaringView()
      Returns the mapping of the view declaring this attribute.
      Returns:
      The declaring view mapping
    • isCollection

      boolean isCollection()
      Returns whether this attribute is of the plural type.
      Returns:
      true if this attribute is of the plural type, false otherwise
    • getContainerBehavior

      Returns the behavior of a plural attribute container if the attribute is plural, or null otherwise.
      Returns:
      The container behavior, or null if attribute is singular
    • setContainerDefault

      void setContainerDefault()
    • setContainerIndexed

      void setContainerIndexed()
    • setContainerOrdered

      void setContainerOrdered()
    • setContainerSorted

      void setContainerSorted​(Class<? extends Comparator<?>> comparatorClass)
      Sets the container behavior to EntityViewAttributeMapping.ContainerBehavior.SORTED using the given comparator class, if given, for sorting. If none is given, the key/element type is expected to implement Comparable.
      Parameters:
      comparatorClass - The class of the comparator to use for sorting or null
    • isForceUniqueness

      boolean isForceUniqueness()
      Specifies whether elements should be forcefully deduplicated if the collection allows duplicates or not.
      Returns:
      true if uniqueness of element should be forced, false otherwise
      Since:
      1.3.0
    • setForceUniqueness

      void setForceUniqueness​(boolean forceUniqueness)
      Sets whether elements should be forcefully deduplicated if the collection allows duplicates or not.
      Parameters:
      forceUniqueness - true if uniqueness of element should be forced, false otherwise
      Since:
      1.3.0
    • isDisallowOwnedUpdatableSubview

      boolean isDisallowOwnedUpdatableSubview()
      Specifies whether an updatable entity view type is disallowed for owned *ToOne relationships or not.
      Returns:
      true if disallowed, false otherwise
      Since:
      1.3.0
    • setDisallowOwnedUpdatableSubview

      void setDisallowOwnedUpdatableSubview​(boolean disallowOwnedUpdatableSubview)
      Sets whether an updatable entity view type is disallowed for owned *ToOne relationships or not.
      Parameters:
      disallowOwnedUpdatableSubview - true if updatable entity view types should be disallowed, false otherwise
      Since:
      1.3.0
    • getComparatorClass

      Class<? extends Comparator<?>> getComparatorClass()
      Returns the comparator class, or null if there none.
      Returns:
      The comparator class
    • getDefaultBatchSize

      Integer getDefaultBatchSize()
      Returns the default batch size to use for batched FetchStrategy.SELECT fetching.
      Returns:
      The default batch size
    • setDefaultBatchSize

      void setDefaultBatchSize​(Integer defaultBatchSize)
      Sets the default batch size to use for batched FetchStrategy.SELECT fetching.
      Parameters:
      defaultBatchSize - The default batch size
    • getCreateEmptyFlatViews

      Boolean getCreateEmptyFlatViews()
      Returns whether to create empty flat views or not.
      Returns:
      whether to create empty flat views or not
      Since:
      1.5.0
    • setCreateEmptyFlatViews

      void setCreateEmptyFlatViews​(Boolean createEmptyFlatViews)
      Sets whether to create empty flat views.
      Parameters:
      createEmptyFlatViews - whether to create empty flat views
      Since:
      1.5.0
    • getLimitExpression

      String getLimitExpression()
      Returns the limit expression.
      Returns:
      the limit expression
      Since:
      1.5.0
    • getOffsetExpression

      String getOffsetExpression()
      Returns the offset expression.
      Returns:
      the offset expression
      Since:
      1.5.0
    • getOrderByItems

      List<String> getOrderByItems()
      Returns the order by item expressions.
      Returns:
      The order by item expressions
      Since:
      1.5.0
    • setLimit

      void setLimit​(String limitExpression, String offsetExpression, List<String> orderByExpressions)
      Sets the limit expression along with the order by expressions.
      Parameters:
      limitExpression - The limit expression
      offsetExpression - The offset expression
      orderByExpressions - The order by item expressions
      Since:
      1.5.0
    • getDeclaredType

      Class<?> getDeclaredType()
      Returns the attribute type.
      Returns:
      The attribute type
    • getDeclaredKeyType

      Class<?> getDeclaredKeyType()
      The attribute's key type, or null if the attribute type is not a subtype of Map.
      Returns:
      The attribute's key type, or null
    • getDeclaredElementType

      Class<?> getDeclaredElementType()
      The attribute's element type, or null if the attribute type is not a subtype of Collection or Map.
      Returns:
      The attribute's element type, or null