Enum Class EventCategory
- All Implemented Interfaces:
Serializable,Comparable<EventCategory>,Constable
The
EventCategory classifies an Event based on the phase during which
it is emitted, so that configuration and mapping events (detected once, at bootstrap)
can be told apart from runtime events (emitted continuously while the application runs).
The classification is based on the fully qualified name of the Event class, so
it does not require a compile-time dependency on every concrete event type.
- Since:
- 2.14.0
- Author:
- Vlad Mihalcea
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConfiguration-related events, detected when scanning the JPA/Hibernate configuration.Mapping-related events, detected when scanning the entity mappings.Runtime events, emitted while the application is executing (e.g. -
Method Summary
Modifier and TypeMethodDescriptionstatic EventCategoryResolve theEventCategoryof the providedEvent.static EventCategoryReturns the enum constant of this class with the specified name.static EventCategory[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONFIGURATION
Configuration-related events, detected when scanning the JPA/Hibernate configuration. -
MAPPING
Mapping-related events, detected when scanning the entity mappings. -
RUNTIME
Runtime events, emitted while the application is executing (e.g. slow queries, N+1 issues).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
of
Resolve theEventCategoryof the providedEvent.- Parameters:
event- theEventto classify- Returns:
- the
EventCategoryof the providedEvent
-