Package io.jmix.core.repository
Class JmixDataRepositoryUtils
java.lang.Object
io.jmix.core.repository.JmixDataRepositoryUtils
Helper class for
JmixDataRepository
. Provides methods to build JmixDataRepositoryContext
by LoadContext
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.data.domain.PageRequest
buildPageRequest
(LoadContext<?> context) static JmixDataRepositoryContext
buildRepositoryContext
(LoadContext<?> context) static <T> T
extractEntityId
(LoadContext<?> context)
-
Constructor Details
-
JmixDataRepositoryUtils
public JmixDataRepositoryUtils()
-
-
Method Details
-
buildRepositoryContext
- Returns:
JmixDataRepositoryContext
with Jmix-specific parameters extracted fromcontext
- Throws:
RuntimeException
- ifLoadContext.getQuery()
} is null
-
buildPageRequest
- Returns:
PageRequest
withfirstResult
,maxResults
andsort
extracted fromcontext
- Throws:
RuntimeException
- ifLoadContext.getQuery()
} is null
-
extractEntityId
- Parameters:
context
- to extract id from- Returns:
- typed id
- Throws:
RuntimeException
- ifid
absent incontext
-