ServiceProvider
public interface EntityViewManager extends ServiceProvider
Modifier and Type | Method | Description |
---|---|---|
<T,Q extends FullQueryBuilder<T,Q>> |
applySetting(EntityViewSetting<T,Q> setting,
CriteriaBuilder<?> criteriaBuilder) |
Applies the entity view setting to the given criteria builder.
|
<T,Q extends FullQueryBuilder<T,Q>> |
applySetting(EntityViewSetting<T,Q> setting,
CriteriaBuilder<?> criteriaBuilder,
java.lang.String entityViewRoot) |
Applies the entity view setting to the given entity view root of the criteria builder.
|
<T> T |
convert(java.lang.Object source,
java.lang.Class<T> entityViewClass,
ConvertOption... convertOptions) |
Creates a new instance of the entity view class, copies the values
of matching attributes of the source object and returns the instance.
|
<T> ConvertOperationBuilder<T> |
convertWith(java.lang.Object source,
java.lang.Class<T> entityViewClass,
ConvertOption... convertOptions) |
Creates a new instance of the entity view class, copies the values
of matching attributes of the source object and returns the instance.
|
<T> T |
create(java.lang.Class<T> entityViewClass) |
Creates a new instance of the entity view class and returns it.
|
<T> T |
find(javax.persistence.EntityManager entityManager,
EntityViewSetting<T,CriteriaBuilder<T>> entityViewSetting,
java.lang.Object entityId) |
Loads and returns an entity view as determined by the given type
EntityViewSetting having the given entity id. |
<T> T |
find(javax.persistence.EntityManager entityManager,
java.lang.Class<T> entityViewClass,
java.lang.Object entityId) |
Loads and returns an entity view of the given type having the given entity id.
|
<T> SingularChangeModel<T> |
getChangeModel(T entityView) |
Gives access to the change model of the entity view instance.
|
<T> T |
getEntityReference(javax.persistence.EntityManager entityManager,
java.lang.Object entityView) |
Creates an entity reference for the given entity view and returns it.
|
ViewMetamodel |
getMetamodel() |
Returns the metamodel for this entity view manager.
|
<T> T |
getReference(java.lang.Class<T> entityViewClass,
java.lang.Object id) |
Creates a reference instance of the entity view class for the given id and returns it.
|
void |
remove(javax.persistence.EntityManager entityManager,
java.lang.Class<?> entityViewClass,
java.lang.Object viewId) |
Removes the entity represented by the entity type defiend for the given view and the given entity id.
|
void |
remove(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Removes the entity represented by the given view.
|
FlushOperationBuilder |
removeWith(javax.persistence.EntityManager entityManager,
java.lang.Class<?> entityViewClass,
java.lang.Object viewId) |
Removes the entity represented by the entity type defiend for the given view and the given entity id.
|
FlushOperationBuilder |
removeWith(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Removes the entity represented by the given view.
|
void |
save(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Saves the entity which the given entity view maps to.
|
void |
saveFull(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Fully saves the entity which the given entity view maps to.
|
void |
saveFullTo(javax.persistence.EntityManager entityManager,
java.lang.Object view,
java.lang.Object entity) |
Fully saves the entity view state onto the given entity.
|
FlushOperationBuilder |
saveFullWith(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Fully saves the entity which the given entity view maps to.
|
FlushOperationBuilder |
saveFullWithTo(javax.persistence.EntityManager entityManager,
java.lang.Object view,
java.lang.Object entity) |
Fully saves the entity view state onto the given entity.
|
void |
saveTo(javax.persistence.EntityManager entityManager,
java.lang.Object view,
java.lang.Object entity) |
Saves the entity view state onto the given entity.
|
FlushOperationBuilder |
saveWith(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Saves the entity which the given entity view maps to.
|
FlushOperationBuilder |
saveWithTo(javax.persistence.EntityManager entityManager,
java.lang.Object view,
java.lang.Object entity) |
Saves the entity view state onto the given entity.
|
void |
update(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Deprecated.
Use
save(EntityManager, Object) instead. This will be removed in 2.0 |
void |
updateFull(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Deprecated.
Use
saveFull(EntityManager, Object) instead. This will be removed in 2.0 |
getService
ViewMetamodel getMetamodel()
<T> T find(javax.persistence.EntityManager entityManager, java.lang.Class<T> entityViewClass, java.lang.Object entityId)
T
- The type of the entity view classentityManager
- The entity manager to use for queryingentityViewClass
- The entity view class to useentityId
- The id of the entity<T> T find(javax.persistence.EntityManager entityManager, EntityViewSetting<T,CriteriaBuilder<T>> entityViewSetting, java.lang.Object entityId)
EntityViewSetting
having the given entity id.T
- The type of the entity view classentityManager
- The entity manager to use for queryingentityViewSetting
- The entity view setting to useentityId
- The id of the entity<T> T getReference(java.lang.Class<T> entityViewClass, java.lang.Object id)
T
- The type of the entity view classentityViewClass
- The entity view class to constructid
- The id of the entity view<T> T getEntityReference(javax.persistence.EntityManager entityManager, java.lang.Object entityView)
T
- The type of the entity classentityManager
- The entity manager to use for the entity referenceentityView
- The entity view class for which to get the entity reference<T> SingularChangeModel<T> getChangeModel(T entityView)
T
- The type of the given entity viewentityView
- The entity view<T> T create(java.lang.Class<T> entityViewClass)
T
- The type of the entity view classentityViewClass
- The entity view class to construct<T> T convert(java.lang.Object source, java.lang.Class<T> entityViewClass, ConvertOption... convertOptions)
T
- The type of the entity view classsource
- The source object from which to copy valuesentityViewClass
- The entity view class to constructconvertOptions
- The options to use for converting<T> ConvertOperationBuilder<T> convertWith(java.lang.Object source, java.lang.Class<T> entityViewClass, ConvertOption... convertOptions)
T
- The type of the entity view classsource
- The source object from which to copy valuesentityViewClass
- The entity view class to constructconvertOptions
- The options to use for convertingvoid save(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the saveview
- The view to use for savingvoid saveFull(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the saveview
- The view to use for savingvoid saveTo(javax.persistence.EntityManager entityManager, java.lang.Object view, java.lang.Object entity)
entityManager
- The entity manager to use for the saveview
- The view to use for savingentity
- The entity to apply data tovoid saveFullTo(javax.persistence.EntityManager entityManager, java.lang.Object view, java.lang.Object entity)
entityManager
- The entity manager to use for the saveview
- The view to use for savingentity
- The entity to apply data to@Deprecated void update(javax.persistence.EntityManager entityManager, java.lang.Object view)
save(EntityManager, Object)
instead. This will be removed in 2.0entityManager
- The entity manager to use for the updateview
- The view to use for updating@Deprecated void updateFull(javax.persistence.EntityManager entityManager, java.lang.Object view)
saveFull(EntityManager, Object)
instead. This will be removed in 2.0entityManager
- The entity manager to use for the updateview
- The view to use for updatingFlushOperationBuilder saveWith(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingFlushOperationBuilder saveFullWith(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingFlushOperationBuilder saveWithTo(javax.persistence.EntityManager entityManager, java.lang.Object view, java.lang.Object entity)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingentity
- The entity to apply data toFlushOperationBuilder saveFullWithTo(javax.persistence.EntityManager entityManager, java.lang.Object view, java.lang.Object entity)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingentity
- The entity to apply data tovoid remove(javax.persistence.EntityManager entityManager, java.lang.Object view)
CascadeType.DELETE
enabled.entityManager
- The entity manager to use for the removingview
- The view for which the entity should be removedFlushOperationBuilder removeWith(javax.persistence.EntityManager entityManager, java.lang.Object view)
CascadeType.DELETE
enabled.entityManager
- The entity manager to use for the removingview
- The view for which the entity should be removedvoid remove(javax.persistence.EntityManager entityManager, java.lang.Class<?> entityViewClass, java.lang.Object viewId)
CascadeType.DELETE
enabled.entityManager
- The entity manager to use for the removingentityViewClass
- The entity view class to useviewId
- The id of entity viewFlushOperationBuilder removeWith(javax.persistence.EntityManager entityManager, java.lang.Class<?> entityViewClass, java.lang.Object viewId)
CascadeType.DELETE
enabled.entityManager
- The entity manager to use for the removingentityViewClass
- The entity view class to useviewId
- The id of entity view<T,Q extends FullQueryBuilder<T,Q>> Q applySetting(EntityViewSetting<T,Q> setting, CriteriaBuilder<?> criteriaBuilder)
T
- The type of the entity viewQ
- PaginatedCriteriaBuilder if paginated, CriteriaBuilder otherwisesetting
- The setting that should be appliedcriteriaBuilder
- The criteria builder on which the setting should be applied<T,Q extends FullQueryBuilder<T,Q>> Q applySetting(EntityViewSetting<T,Q> setting, CriteriaBuilder<?> criteriaBuilder, java.lang.String entityViewRoot)
T
- The type of the entity viewQ
- PaginatedCriteriaBuilder if paginated, CriteriaBuilder otherwisesetting
- The setting that should be appliedcriteriaBuilder
- The criteria builder on which the setting should be appliedentityViewRoot
- The relation from which the entity view should be materializedCopyright © 2014–2020 Blazebit. All rights reserved.