Package org.hibernate.metamodel
Enum CollectionClassification
- java.lang.Object
-
- java.lang.Enum<CollectionClassification>
-
- org.hibernate.metamodel.CollectionClassification
-
- All Implemented Interfaces:
Serializable,Comparable<CollectionClassification>
public enum CollectionClassification extends Enum<CollectionClassification>
Classifications of the plurality.- Since:
- 6.0
- See Also:
CollectionSemantics
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARRAYAn Object or primitive array.BAGA non-unique, unordered collection.ID_BAGABAGwith a generated id for each elementLISTA non-unique, ordered collection following the requirements ofListMAPA collection following the semantics ofMapORDERED_MAPAMAPthat is ordered using an order-by fragment as the collection is loaded.ORDERED_SETASETthat is ordered using an order-by fragment as the collection is loaded.SETA unique, unordered collection following the requirements ofSetSORTED_MAPA sortedMAPusing either natural sorting of the keys or a specifiedComparator.SORTED_SETA sortedSETusing 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 CollectionClassificationinterpretSetting(Object value)One of:CollectionClassificationinstanceCollectionClassificationname (case insensitive)Classreference for eitherListorCollectionbooleanisIndexed()booleanisRowUpdatePossible()PluralAttribute.CollectionTypetoJpaClassification()static CollectionClassificationvalueOf(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 asCollectionorList
-
ID_BAG
public static final CollectionClassification ID_BAG
ABAGwith a generated id for each element
-
LIST
public static final CollectionClassification LIST
A non-unique, ordered collection following the requirements ofList- See Also:
AvailableSettings.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 sortedSETusing either natural sorting of the elements or a specifiedComparator. Represented asSortedSetorSet- 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 sortedMAPusing either natural sorting of the keys or a specifiedComparator. Represented asSortedMaporMap- 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:CollectionClassificationinstanceCollectionClassificationname (case insensitive)Classreference for eitherListorCollection
-
-