Interface PluralAttribute<X,C,E>
- Type Parameters:
X
- The type of the declaring entity viewC
- The type of the represented collectionE
- The element type of the represented collection
- All Superinterfaces:
Attribute<X,C>
- All Known Subinterfaces:
CollectionAttribute<X,E>
,ListAttribute<X,E>
,MapAttribute<X,K,V>
,MethodCollectionAttribute<X,E>
,MethodListAttribute<X,E>
,MethodMapAttribute<X,K,V>
,MethodMultiListAttribute<X,E,C>
,MethodMultiMapAttribute<X,K,V,C>
,MethodPluralAttribute<X,C,E>
,MethodSetAttribute<X,E>
,SetAttribute<X,E>
public interface PluralAttribute<X,C,E> extends Attribute<X,C>
Instances of the type PluralAttribute represent collection-valued attributes.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PluralAttribute.CollectionType
The different collection types.static class
PluralAttribute.ElementCollectionType
The different element collection types.Nested classes/interfaces inherited from interface com.blazebit.persistence.view.metamodel.Attribute
Attribute.AttributeType, Attribute.MappingType, Attribute.MemberType
-
Method Summary
Modifier and Type Method Description PluralAttribute.CollectionType
getCollectionType()
Returns the collection type.Comparator<?>
getComparator()
Returns the comparator that should be used for sorting.Class<Comparator<?>>
getComparatorClass()
Returns the comparator class that should be used for sorting.PluralAttribute.ElementCollectionType
getElementCollectionType()
Returns the element collection type.Map<ManagedViewType<? extends E>,String>
getElementInheritanceSubtypeMappings()
Returns the inheritance subtypes that should be considered for the elements of this plural attribute.Type<E>
getElementType()
Returns the type representing the element type of the collection.boolean
isForcedUnique()
Returns whether this collection is forcefully deduplicated on load or not.boolean
isIndexed()
Returns whether this collection is indexed or not.boolean
isOrdered()
Returns whether this collection is ordered or not.boolean
isSorted()
Returns whether this collection is sorted or not.Methods inherited from interface com.blazebit.persistence.view.metamodel.Attribute
getAttributeType, getBatchSize, getConvertedJavaType, getDeclaringType, getFetches, getFetchStrategy, getJavaType, getLimitExpression, getMappingType, getMemberType, getOffsetExpression, getOrderByItems, isCollection, isCorrelated, isSubquery, isSubview
-
Method Details
-
getCollectionType
PluralAttribute.CollectionType getCollectionType()Returns the collection type.- Returns:
- The collection type
-
getElementCollectionType
PluralAttribute.ElementCollectionType getElementCollectionType()Returns the element collection type.- Returns:
- The element collection type
- Since:
- 1.5.0
-
getElementType
Returns the type representing the element type of the collection.- Returns:
- The element type
- Since:
- 1.2.0
-
getElementInheritanceSubtypeMappings
Map<ManagedViewType<? extends E>,String> getElementInheritanceSubtypeMappings()Returns the inheritance subtypes that should be considered for the elements of this plural attribute. When the element type of the attribute is not a subview, this returns an empty set.- Returns:
- The inheritance subtypes or an empty set
- Since:
- 1.2.0
-
isIndexed
boolean isIndexed()Returns whether this collection is indexed or not.- Returns:
- true if the collection is indexed, false otherwise
-
isOrdered
boolean isOrdered()Returns whether this collection is ordered or not.- Returns:
- true if the collection is ordered, false otherwise
-
isSorted
boolean isSorted()Returns whether this collection is sorted or not.- Returns:
- true if the collection is sorted, false otherwise
-
isForcedUnique
boolean isForcedUnique()Returns whether this collection is forcefully deduplicated on load or not.- Returns:
- true if the collection is forcefully deduplicated on load, false otherwise
- Since:
- 1.3.0
-
getComparator
Comparator<?> getComparator()Returns the comparator that should be used for sorting. Returns null if no sorting is used or the natural sort order should be used.- Returns:
- the comparator that should be used for sorting
-
getComparatorClass
Class<Comparator<?>> getComparatorClass()Returns the comparator class that should be used for sorting. Returns null if no sorting is used or the natural sort order should be used.- Returns:
- the comparator class that should be used for sorting
-