Package org.hibernate.metamodel
Enum CollectionClassification
- java.lang.Object
-
- java.lang.Enum<CollectionClassification>
-
- org.hibernate.metamodel.CollectionClassification
-
- All Implemented Interfaces:
Serializable
,Comparable<CollectionClassification>
@Incubating public enum CollectionClassification extends Enum<CollectionClassification>
Classifications of the plurality.- Since:
- 6.0
- See Also:
CollectionSemantics
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAY
An Object or primitive array.BAG
A non-unique, unordered collection.ID_BAG
ABAG
with a generated id for each elementLIST
A non-unique, ordered collection following the requirements ofList
MAP
A collection following the semantics ofMap
ORDERED_MAP
AMAP
that is ordered using an order-by fragment as the collection is loaded.ORDERED_SET
ASET
that is ordered using an order-by fragment as the collection is loaded.SET
A unique, unordered collection following the requirements ofSet
SORTED_MAP
A sortedMAP
using either natural sorting of the keys or a specifiedComparator
.SORTED_SET
A sortedSET
using either natural sorting of the elements or a specifiedComparator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CollectionClassification
interpretSetting(Object value)
One of:CollectionClassification
instanceCollectionClassification
name (case insensitive)Class
reference for eitherList
orCollection
boolean
isIndexed()
boolean
isRowUpdatePossible()
PluralAttribute.CollectionType
toJpaClassification()
static CollectionClassification
valueOf(String name)
Returns the enum constant of this type with the specified name.static CollectionClassification[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ARRAY
public static final CollectionClassification ARRAY
An Object or primitive array. Roughly follows the semantics ofLIST
-
BAG
public static final CollectionClassification BAG
A non-unique, unordered collection. Represented asCollection
orList
-
ID_BAG
public static final CollectionClassification ID_BAG
ABAG
with a generated id for each element
-
LIST
public static final CollectionClassification LIST
A non-unique, ordered collection following the requirements ofList
- See Also:
MappingSettings.DEFAULT_LIST_SEMANTICS
-
SET
public static final CollectionClassification SET
A unique, unordered collection following the requirements ofSet
-
SORTED_SET
public static final CollectionClassification SORTED_SET
A sortedSET
using either natural sorting of the elements or a specifiedComparator
. Represented asSortedSet
orSet
- See Also:
SortNatural
,SortComparator
-
ORDERED_SET
public static final CollectionClassification ORDERED_SET
-
MAP
public static final CollectionClassification MAP
A collection following the semantics ofMap
-
SORTED_MAP
public static final CollectionClassification SORTED_MAP
A sortedMAP
using either natural sorting of the keys or a specifiedComparator
. Represented asSortedMap
orMap
- See Also:
SortNatural
,SortComparator
-
ORDERED_MAP
public static final CollectionClassification ORDERED_MAP
-
-
Method Detail
-
values
public static CollectionClassification[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CollectionClassification c : CollectionClassification.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CollectionClassification valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toJpaClassification
public PluralAttribute.CollectionType toJpaClassification()
-
isIndexed
public boolean isIndexed()
-
isRowUpdatePossible
public boolean isRowUpdatePossible()
-
interpretSetting
public static CollectionClassification interpretSetting(Object value)
One of:CollectionClassification
instanceCollectionClassification
name (case insensitive)Class
reference for eitherList
orCollection
-
-