Interface ManagedViewType<X>
- Type Parameters:
X
- The type of the entity view
- All Superinterfaces:
Type<X>
- All Known Subinterfaces:
FlatViewType<X>
,ViewType<X>
public interface ManagedViewType<X> extends Type<X>
Represents the metamodel of an managed entity view type which is either an entity view or an embeddable entity view.
- Since:
- 1.1.0
- Author:
- Christian Beikov
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blazebit.persistence.view.metamodel.Type
Type.MappingType
-
Method Summary
Modifier and Type Method Description MethodAttribute<? super X,?>
getAttribute(String name)
Returns the attribute of the entity view specified by the given name.Set<MethodAttribute<? super X,?>>
getAttributes()
Returns the attributes of the entity view.MappingConstructor<X>
getConstructor(Class<?>... parameterTypes)
Returns the mapping constructor of the entity view specified by the given parameter types.MappingConstructor<X>
getConstructor(String name)
Returns the constructor of the entity view specified by the given name.Set<String>
getConstructorNames()
Returns the names of the constructors of the entity view.Set<MappingConstructor<X>>
getConstructors()
Returns the mapping constructors of the entity view.Set<CTEProvider>
getCteProviders()
Returns the set ofCTEProvider
defined in the view using theWith
annotation.int
getDefaultBatchSize()
Returns the default batch size for the attributes of this view type.Class<?>
getEntityClass()
Returns the entity class that the entity view uses.FlushMode
getFlushMode()
The flush mode to use for the entity view or null if not updatable.FlushStrategy
getFlushStrategy()
The flush strategy to use for the entity view or null if not updatable.String
getInheritanceMapping()
Returns the inheritance mapping that should be used for inheritance subtype selection.Set<ManagedViewType<? extends X>>
getInheritanceSubtypes()
Returns the transitive closure of all subtypes that should be considered for inheritance selection.Set<String>
getPersistabilityValidationExcludedEntityAttributes()
The entity attributes that are excluded from the persistability validation, nevernull
.Method
getPostCommitMethod()
Returns the post commit method ornull
if there is none.Set<ViewTransition>
getPostCommitTransitions()
Returns the post commit transitions.Method
getPostConvertMethod()
Returns the method to be invoked after conversion to this entity view type viaEntityViewManager.convert(Object, Class, ConvertOption...)
.Method
getPostCreateMethod()
Returns the method to be invoked after creating an entity view viaEntityViewManager.create(Class)
.Method
getPostLoadMethod()
Returns the method to be invoked after loading an entity view.Method
getPostPersistMethod()
Returns the post persist method ornull
if there is none.Method
getPostRemoveMethod()
Returns the post remove method ornull
if there is none.Method
getPostRollbackMethod()
Returns the post rollback method ornull
if there is none.Set<ViewTransition>
getPostRollbackTransitions()
Returns the post rollback transitions.Method
getPostUpdateMethod()
Returns the post update method ornull
if there is none.Method
getPrePersistMethod()
Returns the pre persist method ornull
if there is none.Method
getPreRemoveMethod()
Returns the pre remove method ornull
if there is none.Method
getPreUpdateMethod()
Returns the pre update method ornull
if there is none.boolean
isCreatable()
Returns whether the entity view is creatable.boolean
isPersistabilityValidationEnabled()
Returns whether the persistability validation is enabled for this entity view.boolean
isUpdatable()
Returns whether the entity view is updatable.Methods inherited from interface com.blazebit.persistence.view.metamodel.Type
getConvertedType, getConverter, getJavaType, getMappingType
-
Method Details
-
getEntityClass
Class<?> getEntityClass()Returns the entity class that the entity view uses.- Returns:
- The entity class that the entity view uses
-
getDefaultBatchSize
int getDefaultBatchSize()Returns the default batch size for the attributes of this view type. If no default batch size is configured, returns -1.- Returns:
- The default batch size for the attributes
- Since:
- 1.2.0
-
getAttributes
Set<MethodAttribute<? super X,?>> getAttributes()Returns the attributes of the entity view.- Returns:
- The attributes of the entity view
-
getAttribute
Returns the attribute of the entity view specified by the given name.- Parameters:
name
- The name of the attribute which should be returned- Returns:
- The attribute of the entity view with the given name
-
getConstructors
Set<MappingConstructor<X>> getConstructors()Returns the mapping constructors of the entity view.- Returns:
- The mapping constructors of the entity view
-
getConstructor
Returns the mapping constructor of the entity view specified by the given parameter types.- Parameters:
parameterTypes
- The parameter types of the constructor which should be returned.- Returns:
- The mapping constructor of the entity view with the given parameter types
-
getConstructorNames
Returns the names of the constructors of the entity view.- Returns:
- The names of the constructors of the entity view
-
getConstructor
Returns the constructor of the entity view specified by the given name.- Parameters:
name
- The name of the constructor which should be returned- Returns:
- The constructor of the entity view with the given name
-
getInheritanceMapping
String getInheritanceMapping()Returns the inheritance mapping that should be used for inheritance subtype selection.- Returns:
- The inheritance mapping
- Since:
- 1.2.0
-
getInheritanceSubtypes
Set<ManagedViewType<? extends X>> getInheritanceSubtypes()Returns the transitive closure of all subtypes that should be considered for inheritance selection.- Returns:
- The entity view subtypes for inheritance
- Since:
- 1.2.0
-
isUpdatable
boolean isUpdatable()Returns whether the entity view is updatable.- Returns:
- Whether the entity view is updatable
-
isCreatable
boolean isCreatable()Returns whether the entity view is creatable.- Returns:
- Whether the entity view is creatable
- Since:
- 1.2.0
-
getPostCreateMethod
Method getPostCreateMethod()Returns the method to be invoked after creating an entity view viaEntityViewManager.create(Class)
.- Returns:
- The method to be invoked after creation.
-
getPostConvertMethod
Method getPostConvertMethod()Returns the method to be invoked after conversion to this entity view type viaEntityViewManager.convert(Object, Class, ConvertOption...)
.- Returns:
- The method to be invoked after conversion.
- Since:
- 1.4.0
-
getPostLoadMethod
Method getPostLoadMethod()Returns the method to be invoked after loading an entity view.- Returns:
- The method to be invoked after loading.
- Since:
- 1.5.0
-
getPrePersistMethod
Method getPrePersistMethod()Returns the pre persist method ornull
if there is none.- Returns:
- The pre persist method
- Since:
- 1.4.0
-
getPostPersistMethod
Method getPostPersistMethod()Returns the post persist method ornull
if there is none.- Returns:
- The post persist method
- Since:
- 1.4.0
-
getPreUpdateMethod
Method getPreUpdateMethod()Returns the pre update method ornull
if there is none.- Returns:
- The pre update method
- Since:
- 1.4.0
-
getPostUpdateMethod
Method getPostUpdateMethod()Returns the post update method ornull
if there is none.- Returns:
- The post update method
- Since:
- 1.4.0
-
getPreRemoveMethod
Method getPreRemoveMethod()Returns the pre remove method ornull
if there is none.- Returns:
- The pre remove method
- Since:
- 1.4.0
-
getPostRemoveMethod
Method getPostRemoveMethod()Returns the post remove method ornull
if there is none.- Returns:
- The post remove method
- Since:
- 1.4.0
-
getPostRollbackMethod
Method getPostRollbackMethod()Returns the post rollback method ornull
if there is none.- Returns:
- The post rollback method
- Since:
- 1.4.0
-
getPostCommitMethod
Method getPostCommitMethod()Returns the post commit method ornull
if there is none.- Returns:
- The post commit method
- Since:
- 1.4.0
-
getPostRollbackTransitions
Set<ViewTransition> getPostRollbackTransitions()Returns the post rollback transitions.- Returns:
- The post rollback transitions
- Since:
- 1.4.0
-
getPostCommitTransitions
Set<ViewTransition> getPostCommitTransitions()Returns the post commit transitions.- Returns:
- The post commit transitions
- Since:
- 1.4.0
-
getFlushMode
FlushMode getFlushMode()The flush mode to use for the entity view or null if not updatable.- Returns:
- The flush mode
- Since:
- 1.2.0
-
getFlushStrategy
FlushStrategy getFlushStrategy()The flush strategy to use for the entity view or null if not updatable.- Returns:
- The flush strategy
- Since:
- 1.2.0
-
isPersistabilityValidationEnabled
boolean isPersistabilityValidationEnabled()Returns whether the persistability validation is enabled for this entity view.- Returns:
- Whether the validation is enabled
- Since:
- 1.2.0
-
getPersistabilityValidationExcludedEntityAttributes
The entity attributes that are excluded from the persistability validation, nevernull
.- Returns:
- The entity attributes that are excluded from validation
- Since:
- 1.2.0
-
getCteProviders
Set<CTEProvider> getCteProviders()Returns the set ofCTEProvider
defined in the view using theWith
annotation.- Returns:
- the set of
CTEProvider
- Since:
- 1.4.0
-