Interface EntityViewMapping
public interface EntityViewMapping
A mapping for an entity view type.
- Since:
- 1.2.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute mappings defined for this entity view mapping.Returns the constructor mappings defined for this entity view mapping.Class<?>The JPA managed type class for which this entity view mapping is defined.Class<?>The type represented by this entity view mapping.Returns the flush mode to use for updates ornullif the entity view should not be updatable.Returns the flush strategy to use for updates ornullif the entity view should not be updatable.Returns the id attribute mapping of this entity view mapping ornullif there is none.Returns the lock mode to use for doing updates ornullif the entity view should not be updatable.Returns the lock owner mapping relative to the JPA managed type of this entity view to use for updates ornullif the entity view should not be updatable.Returns the post commit method ornullif there is none.Returns the post commit view transitions ornullif there is none.Returns the post convert method ornullif there is none.Returns the post create method ornullif there is none.Returns the post load method ornullif there is none.Returns the post persist method ornullif there is none.Returns the post remove method ornullif there is none.Returns the post rollback method ornullif there is none.Returns the post rollback view transitions ornullif there is none.Returns the post update method ornullif there is none.Returns the pre persist method ornullif there is none.Returns the pre remove method ornullif there is none.Returns the pre update method ornullif there is none.Returns the version attribute mapping of this entity view mapping ornullif ther is none.booleanReturns whether the entity view should be creatable i.e. support persist viaEntityViewManager.save(EntityManager, Object).booleanReturns whether the entity view should be updatable i.e. support updates viaEntityViewManager.save(EntityManager, Object).booleanReturns whether the persistability of an entity view should be validated i.e. check if an entity could be successfully persisted based on the settable attributes.voidsetCreatable(boolean creatable) Set whether the entity view should be creatable.voidsetEntityClass(Class<?> entityClass) Set the JPA managed type class for this entity view mapping.voidsetFlushMode(FlushMode flushMode) Set the flush mode to use for updates.voidsetFlushStrategy(FlushStrategy flushStrategy) Set the flush strategy to use for updates.voidsetIdAttribute(EntityViewAttributeMapping idAttribute) Set the id attribute mapping of this entity view mapping.voidsetLockMode(LockMode lockMode) Set the lock mode to use for updates.voidsetLockOwner(String lockOwner) Set the lock owner mapping relative to the JPA managed type of this entity view.voidsetPostCommitMethod(Method postCommitMethod) Sets the post commit method.voidsetPostCommitTransitions(ViewTransition[] viewTransitions) Sets the post commit view transitions.voidsetPostConvertMethod(Method postConvertMethod) Sets the post convert method.voidsetPostCreateMethod(Method postCreateMethod) Sets the post create method.voidsetPostLoadMethod(Method postLoadMethod) Sets the post load method.voidsetPostPersistMethod(Method postPersistMethod) Sets the post persist method.voidsetPostRemoveMethod(Method postRemoveMethod) Sets the post remove method.voidsetPostRollbackMethod(Method postRollbackMethod) Sets the post rollback method.voidsetPostRollbackTransitions(ViewTransition[] viewTransitions) Sets the post rollback view transitions.voidsetPostUpdateMethod(Method postUpdateMethod) Sets the post update method.voidsetPrePersistMethod(Method prePersistMethod) Sets the pre persist method.voidsetPreRemoveMethod(Method preRemoveMethod) Sets the pre remove method.voidsetPreUpdateMethod(Method preUpdateMethod) Sets the pre update method.voidsetUpdatable(boolean updatable) Set whether the entity view should be updatable.voidsetValidatePersistability(boolean validatePersistability) Set whether the entity view should be validated regarding it's persistability.voidsetVersionAttribute(EntityViewAttributeMapping versionAttribute) Set the version attribute mapping of this entity view mapping.
-
Method Details
-
getEntityViewClass
Class<?> getEntityViewClass()The type represented by this entity view mapping.- Returns:
- The entity view type
-
getEntityClass
Class<?> getEntityClass()The JPA managed type class for which this entity view mapping is defined.- Returns:
- The JPA managed type class
-
setEntityClass
Set the JPA managed type class for this entity view mapping.- Parameters:
entityClass- The JPA managed type class
-
isUpdatable
boolean isUpdatable()Returns whether the entity view should be updatable i.e. support updates viaEntityViewManager.save(EntityManager, Object).- Returns:
- Whether the entity view should be updatable
-
setUpdatable
void setUpdatable(boolean updatable) Set whether the entity view should be updatable.- Parameters:
updatable- Whether the entity view should be updatable
-
getLockMode
LockMode getLockMode()Returns the lock mode to use for doing updates ornullif the entity view should not be updatable.- Returns:
- The lock mode for updates
-
setLockMode
Set the lock mode to use for updates.- Parameters:
lockMode- The lock mode
-
getLockOwner
String getLockOwner()Returns the lock owner mapping relative to the JPA managed type of this entity view to use for updates ornullif the entity view should not be updatable.- Returns:
- The lock owner for updates
-
setLockOwner
Set the lock owner mapping relative to the JPA managed type of this entity view.- Parameters:
lockOwner- The lock owner mapping
-
getFlushMode
FlushMode getFlushMode()Returns the flush mode to use for updates ornullif the entity view should not be updatable.- Returns:
- The flush mode for updates
-
setFlushMode
Set the flush mode to use for updates.- Parameters:
flushMode- The flush mode
-
getFlushStrategy
FlushStrategy getFlushStrategy()Returns the flush strategy to use for updates ornullif the entity view should not be updatable.- Returns:
- The flush strategy for updates
-
setFlushStrategy
Set the flush strategy to use for updates.- Parameters:
flushStrategy- The flush strategy
-
getPostCreateMethod
Method getPostCreateMethod()Returns the post create method ornullif there is none.- Returns:
- The post create method
-
setPostCreateMethod
Sets the post create method.- Parameters:
postCreateMethod- The method
-
getPostConvertMethod
Method getPostConvertMethod()Returns the post convert method ornullif there is none.- Returns:
- The post convert method
- Since:
- 1.4.0
-
setPostConvertMethod
Sets the post convert method.- Parameters:
postConvertMethod- The method- Since:
- 1.4.0
-
getPostLoadMethod
Method getPostLoadMethod()Returns the post load method ornullif there is none.- Returns:
- The post load method
- Since:
- 1.5.0
-
setPostLoadMethod
Sets the post load method.- Parameters:
postLoadMethod- The method- Since:
- 1.5.0
-
getPrePersistMethod
Method getPrePersistMethod()Returns the pre persist method ornullif there is none.- Returns:
- The pre persist method
- Since:
- 1.4.0
-
setPrePersistMethod
Sets the pre persist method.- Parameters:
prePersistMethod- The method- Since:
- 1.4.0
-
getPostPersistMethod
Method getPostPersistMethod()Returns the post persist method ornullif there is none.- Returns:
- The post persist method
- Since:
- 1.4.0
-
setPostPersistMethod
Sets the post persist method.- Parameters:
postPersistMethod- The method- Since:
- 1.4.0
-
getPreUpdateMethod
Method getPreUpdateMethod()Returns the pre update method ornullif there is none.- Returns:
- The pre update method
- Since:
- 1.4.0
-
setPreUpdateMethod
Sets the pre update method.- Parameters:
preUpdateMethod- The method- Since:
- 1.4.0
-
getPostUpdateMethod
Method getPostUpdateMethod()Returns the post update method ornullif there is none.- Returns:
- The post update method
- Since:
- 1.4.0
-
setPostUpdateMethod
Sets the post update method.- Parameters:
postUpdateMethod- The method- Since:
- 1.4.0
-
getPreRemoveMethod
Method getPreRemoveMethod()Returns the pre remove method ornullif there is none.- Returns:
- The pre remove method
- Since:
- 1.4.0
-
setPreRemoveMethod
Sets the pre remove method.- Parameters:
preRemoveMethod- The method- Since:
- 1.4.0
-
getPostRemoveMethod
Method getPostRemoveMethod()Returns the post remove method ornullif there is none.- Returns:
- The post remove method
- Since:
- 1.4.0
-
setPostRemoveMethod
Sets the post remove method.- Parameters:
postRemoveMethod- The method- Since:
- 1.4.0
-
getPostRollbackMethod
Method getPostRollbackMethod()Returns the post rollback method ornullif there is none.- Returns:
- The post rollback method
- Since:
- 1.4.0
-
setPostRollbackMethod
Sets the post rollback method.- Parameters:
postRollbackMethod- The method- Since:
- 1.4.0
-
getPostCommitMethod
Method getPostCommitMethod()Returns the post commit method ornullif there is none.- Returns:
- The post commit method
- Since:
- 1.4.0
-
setPostCommitMethod
Sets the post commit method.- Parameters:
postCommitMethod- The method- Since:
- 1.4.0
-
getPostRollbackTransitions
ViewTransition[] getPostRollbackTransitions()Returns the post rollback view transitions ornullif there is none.- Returns:
- The post rollback view transitions
- Since:
- 1.4.0
-
setPostRollbackTransitions
Sets the post rollback view transitions.- Parameters:
viewTransitions- The view transitions- Since:
- 1.4.0
-
getPostCommitTransitions
ViewTransition[] getPostCommitTransitions()Returns the post commit view transitions ornullif there is none.- Returns:
- The post commit view transitions
- Since:
- 1.4.0
-
setPostCommitTransitions
Sets the post commit view transitions.- Parameters:
viewTransitions- The view transitions- Since:
- 1.4.0
-
isCreatable
boolean isCreatable()Returns whether the entity view should be creatable i.e. support persist viaEntityViewManager.save(EntityManager, Object).- Returns:
- Whether the entity view should be creatable
-
setCreatable
void setCreatable(boolean creatable) Set whether the entity view should be creatable.- Parameters:
creatable- Whether the entity view should be creatable
-
isValidatePersistability
boolean isValidatePersistability()Returns whether the persistability of an entity view should be validated i.e. check if an entity could be successfully persisted based on the settable attributes.- Returns:
- Whether the persistability of an entity view should be validated
-
setValidatePersistability
void setValidatePersistability(boolean validatePersistability) Set whether the entity view should be validated regarding it's persistability.- Parameters:
validatePersistability- Whether the entity view should be validated regarding it's persistability
-
getIdAttribute
EntityViewAttributeMapping getIdAttribute()Returns the id attribute mapping of this entity view mapping ornullif there is none.- Returns:
- The id attribute mapping or
nullif there is none
-
setIdAttribute
Set the id attribute mapping of this entity view mapping. Note that the attribute must be one of the attributes as given bygetAttributes()ornull.- Parameters:
idAttribute- The id attribute mapping
-
getVersionAttribute
EntityViewAttributeMapping getVersionAttribute()Returns the version attribute mapping of this entity view mapping ornullif ther is none.- Returns:
- The version attribute mapping or
nullif there is none
-
setVersionAttribute
Set the version attribute mapping of this entity view mapping. Note that the attribute must be one of the attributes as given bygetAttributes()ornull.- Parameters:
versionAttribute- The version attribute mapping
-
getAttributes
Map<String,EntityViewAttributeMapping> getAttributes()Returns the attribute mappings defined for this entity view mapping.- Returns:
- The defined attribute mappings
-
getConstructors
Map<String,EntityViewConstructorMapping> getConstructors()Returns the constructor mappings defined for this entity view mapping.- Returns:
- The defined constructor mappings
-