@Component(value="eclipselink_JpaDataStore")
@Scope(value="prototype")
public class JpaDataStore
extends io.jmix.core.datastore.AbstractDataStore
implements io.jmix.core.DataSortingOptions
DataStore interface working with a relational database using JPA.| Modifier and Type | Field and Description |
|---|---|
protected io.jmix.core.AccessManager |
accessManager |
protected org.springframework.context.ApplicationContext |
applicationContext |
protected DbmsSpecifics |
dbmsSpecifics |
protected EntityChangedEventManager |
entityChangedEventManager |
protected EntityEventManager |
entityEventManager |
protected io.jmix.core.ExtendedEntities |
extendedEntities |
protected io.jmix.core.FetchPlanRepository |
fetchPlanRepository |
protected io.jmix.core.FetchPlans |
fetchPlans |
protected org.springframework.beans.factory.ObjectProvider<JpqlQueryBuilder> |
jpqlQueryBuilderProvider |
static java.lang.String |
LOAD_TX_PREFIX |
protected EclipselinkPersistenceSupport |
persistenceSupport |
protected DataProperties |
properties |
protected QueryResultsManager |
queryResultsManager |
protected QueryTransformerFactory |
queryTransformerFactory |
static java.lang.String |
SAVE_TX_PREFIX |
protected StoreAwareLocator |
storeAwareLocator |
protected java.lang.String |
storeName |
protected static java.util.concurrent.atomic.AtomicLong |
txCount |
| Constructor and Description |
|---|
JpaDataStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
beforeLoadTransactionCommit(io.jmix.core.LoadContext<?> context,
java.util.Collection<java.lang.Object> entities) |
protected void |
beforeSaveTransactionCommit(io.jmix.core.SaveContext context,
java.util.Collection<java.lang.Object> savedEntities,
java.util.Collection<java.lang.Object> removedEntities) |
protected void |
beforeSaveTransactionRollback(io.jmix.core.SaveContext context) |
protected java.lang.Object |
beginLoadTransaction(boolean joinTransaction) |
protected java.lang.Object |
beginSaveTransaction(boolean joinTransaction) |
protected void |
commitTransaction(java.lang.Object transaction) |
protected long |
countAll(io.jmix.core.LoadContext<?> context) |
protected long |
countAllValues(io.jmix.core.ValueLoadContext context) |
protected io.jmix.core.FetchPlan |
createFetchPlan(io.jmix.core.LoadContext<?> context) |
protected javax.persistence.Query |
createLoadQuery(javax.persistence.EntityManager em,
io.jmix.core.ValueLoadContext context,
boolean count) |
protected javax.persistence.Query |
createQuery(javax.persistence.EntityManager em,
io.jmix.core.LoadContext<?> context,
boolean countQuery) |
protected java.util.Set<java.lang.Object> |
deleteAll(io.jmix.core.SaveContext context) |
protected <E> void |
detachEntity(javax.persistence.EntityManager em,
E rootEntity,
io.jmix.core.FetchPlan fetchPlan,
boolean loadedOnly) |
protected java.util.List<java.lang.Object> |
executeQuery(javax.persistence.Query query,
boolean singleResult) |
java.lang.String |
getName() |
protected java.util.regex.Pattern |
getUniqueConstraintViolationPattern() |
boolean |
isNullsLastSorting() |
protected boolean |
isSingleResult(io.jmix.core.LoadContext<?> context) |
protected java.util.List<java.lang.Object> |
loadAll(io.jmix.core.LoadContext<?> context) |
protected java.util.List<java.lang.Object> |
loadAllByIdBatches(io.jmix.core.LoadContext<?> context,
javax.persistence.EntityManager em) |
protected java.util.List<java.lang.Object> |
loadAllByIds(io.jmix.core.LoadContext<?> context,
javax.persistence.EntityManager em) |
protected java.util.List<java.lang.Object> |
loadAllValues(io.jmix.core.ValueLoadContext context) |
protected java.lang.Object |
loadOne(io.jmix.core.LoadContext<?> context) |
protected java.lang.String |
resolveConstraintName(java.util.regex.Matcher matcher) |
protected void |
rollbackTransaction(java.lang.Object transaction) |
protected java.util.Set<java.lang.Object> |
saveAll(io.jmix.core.SaveContext context) |
void |
setName(java.lang.String name) |
boolean |
supportsLobSortingAndFiltering() |
checkAndReorderLoadedEntities, copyNonPersistentAttributes, fireEvent, getCount, getCount, getFetchPlanForSave, load, loadAllAfterSave, loadList, loadListByBatches, loadValues, registerInterceptor, save, setEntityStates, setKeyValueMapper, setMetadata, setMetadataToolspublic static final java.lang.String LOAD_TX_PREFIX
public static final java.lang.String SAVE_TX_PREFIX
@Autowired protected DataProperties properties
@Autowired protected io.jmix.core.FetchPlans fetchPlans
@Autowired protected io.jmix.core.AccessManager accessManager
@Autowired protected QueryResultsManager queryResultsManager
@Autowired protected QueryTransformerFactory queryTransformerFactory
@Autowired protected EntityChangedEventManager entityChangedEventManager
@Autowired protected EntityEventManager entityEventManager
@Autowired protected DbmsSpecifics dbmsSpecifics
@Autowired protected StoreAwareLocator storeAwareLocator
@Autowired protected org.springframework.context.ApplicationContext applicationContext
@Autowired protected io.jmix.core.ExtendedEntities extendedEntities
@Autowired protected org.springframework.beans.factory.ObjectProvider<JpqlQueryBuilder> jpqlQueryBuilderProvider
@Autowired protected EclipselinkPersistenceSupport persistenceSupport
@Autowired protected io.jmix.core.FetchPlanRepository fetchPlanRepository
protected java.lang.String storeName
protected static final java.util.concurrent.atomic.AtomicLong txCount
public java.lang.String getName()
getName in interface io.jmix.core.DataStorepublic void setName(java.lang.String name)
setName in interface io.jmix.core.DataStore@Nullable protected java.lang.Object loadOne(io.jmix.core.LoadContext<?> context)
loadOne in class io.jmix.core.datastore.AbstractDataStoreprotected java.util.List<java.lang.Object> loadAll(io.jmix.core.LoadContext<?> context)
loadAll in class io.jmix.core.datastore.AbstractDataStoreprotected java.util.List<java.lang.Object> loadAllByIds(io.jmix.core.LoadContext<?> context,
javax.persistence.EntityManager em)
protected java.util.List<java.lang.Object> loadAllByIdBatches(io.jmix.core.LoadContext<?> context,
javax.persistence.EntityManager em)
protected long countAll(io.jmix.core.LoadContext<?> context)
countAll in class io.jmix.core.datastore.AbstractDataStoreprotected java.util.Set<java.lang.Object> saveAll(io.jmix.core.SaveContext context)
saveAll in class io.jmix.core.datastore.AbstractDataStoreprotected java.util.Set<java.lang.Object> deleteAll(io.jmix.core.SaveContext context)
deleteAll in class io.jmix.core.datastore.AbstractDataStoreprotected java.util.List<java.lang.Object> loadAllValues(io.jmix.core.ValueLoadContext context)
loadAllValues in class io.jmix.core.datastore.AbstractDataStoreprotected long countAllValues(io.jmix.core.ValueLoadContext context)
countAllValues in class io.jmix.core.datastore.AbstractDataStoreprotected java.lang.Object beginLoadTransaction(boolean joinTransaction)
beginLoadTransaction in class io.jmix.core.datastore.AbstractDataStoreprotected void beforeLoadTransactionCommit(io.jmix.core.LoadContext<?> context,
java.util.Collection<java.lang.Object> entities)
beforeLoadTransactionCommit in class io.jmix.core.datastore.AbstractDataStoreprotected void rollbackTransaction(java.lang.Object transaction)
rollbackTransaction in class io.jmix.core.datastore.AbstractDataStoreprotected void commitTransaction(java.lang.Object transaction)
commitTransaction in class io.jmix.core.datastore.AbstractDataStoreprotected java.lang.Object beginSaveTransaction(boolean joinTransaction)
beginSaveTransaction in class io.jmix.core.datastore.AbstractDataStoreprotected void beforeSaveTransactionCommit(io.jmix.core.SaveContext context,
java.util.Collection<java.lang.Object> savedEntities,
java.util.Collection<java.lang.Object> removedEntities)
beforeSaveTransactionCommit in class io.jmix.core.datastore.AbstractDataStoreprotected void beforeSaveTransactionRollback(io.jmix.core.SaveContext context)
beforeSaveTransactionRollback in class io.jmix.core.datastore.AbstractDataStoreprotected javax.persistence.Query createQuery(javax.persistence.EntityManager em,
io.jmix.core.LoadContext<?> context,
boolean countQuery)
protected javax.persistence.Query createLoadQuery(javax.persistence.EntityManager em,
io.jmix.core.ValueLoadContext context,
boolean count)
protected io.jmix.core.FetchPlan createFetchPlan(io.jmix.core.LoadContext<?> context)
protected java.util.List<java.lang.Object> executeQuery(javax.persistence.Query query,
boolean singleResult)
protected <E> void detachEntity(javax.persistence.EntityManager em,
@Nullable
E rootEntity,
@Nullable
io.jmix.core.FetchPlan fetchPlan,
boolean loadedOnly)
protected boolean isSingleResult(io.jmix.core.LoadContext<?> context)
context - - loading contextpublic boolean isNullsLastSorting()
isNullsLastSorting in interface io.jmix.core.DataSortingOptionspublic boolean supportsLobSortingAndFiltering()
supportsLobSortingAndFiltering in interface io.jmix.core.DataSortingOptionsprotected java.util.regex.Pattern getUniqueConstraintViolationPattern()
protected java.lang.String resolveConstraintName(java.util.regex.Matcher matcher)