public interface EntityViewManager
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> 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 id) |
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 id) |
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.
|
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 id) |
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.
|
void |
update(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Updates the entity which the given entity view maps to.
|
void |
updateFull(javax.persistence.EntityManager entityManager,
java.lang.Object view) |
Fully updates the entity which the given entity view maps to.
|
ViewMetamodel getMetamodel()
<T> T find(javax.persistence.EntityManager entityManager, java.lang.Class<T> entityViewClass, java.lang.Object id)
T
- The type of the entity view classentityManager
- The entity manager to use for queryingentityViewClass
- The entity view class to useid
- The id of the entity<T> T find(javax.persistence.EntityManager entityManager, EntityViewSetting<T,CriteriaBuilder<T>> entityViewSetting, java.lang.Object id)
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 useid
- 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> 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 convertingvoid update(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingvoid updateFull(javax.persistence.EntityManager entityManager, java.lang.Object view)
entityManager
- The entity manager to use for the updateview
- The view to use for updatingvoid 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 removedvoid remove(javax.persistence.EntityManager entityManager, java.lang.Class<?> entityViewClass, java.lang.Object id)
CascadeType.DELETE
enabled.entityManager
- The entity manager to use for the removingentityViewClass
- The entity view class to useid
- The id of the entity<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–2018 Blazebit. All rights reserved.