public interface EntityViewManager
| Modifier and Type | Method and 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,
String entityViewRoot)
Applies the entity view setting to the given entity view root of the criteria builder.
|
<T> T |
convert(Object source,
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(Class<T> entityViewClass)
Creates a new instance of the entity view class and returns it.
|
<T> T |
find(javax.persistence.EntityManager entityManager,
Class<T> entityViewClass,
Object id)
Loads and returns an entity view of the given type having the given entity id.
|
<T> T |
find(javax.persistence.EntityManager entityManager,
EntityViewSetting<T,CriteriaBuilder<T>> entityViewSetting,
Object id)
Loads and returns an entity view as determined by the given type
EntityViewSetting 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(Class<T> entityViewClass,
Object id)
Creates a reference instance of the entity view class for the given id and returns it.
|
void |
remove(javax.persistence.EntityManager entityManager,
Class<?> entityViewClass,
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,
Object view)
Removes the entity represented by the given view.
|
void |
update(javax.persistence.EntityManager entityManager,
Object view)
Updates the entity which the given entity view maps to.
|
void |
updateFull(javax.persistence.EntityManager entityManager,
Object view)
Fully updates the entity which the given entity view maps to.
|
ViewMetamodel getMetamodel()
<T> T find(javax.persistence.EntityManager entityManager,
Class<T> entityViewClass,
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,
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(Class<T> entityViewClass, 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(Class<T> entityViewClass)
T - The type of the entity view classentityViewClass - The entity view class to construct<T> T convert(Object source, 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,
Object view)
entityManager - The entity manager to use for the updateview - The view to use for updatingvoid updateFull(javax.persistence.EntityManager entityManager,
Object view)
entityManager - The entity manager to use for the updateview - The view to use for updatingvoid remove(javax.persistence.EntityManager entityManager,
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,
Class<?> entityViewClass,
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, 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.