Package io.sapl.springdatacommon.utils
Class Utilities
java.lang.Object
io.sapl.springdatacommon.utils.Utilities
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ObjectconvertReturnTypeIfNecessary(reactor.core.publisher.Flux<T> databaseObjects, Class<?> returnClassOfMethod) To avoid duplicate code and for simplicity, fluxes were used in all EnforcementPoints, even if the database method expects a mono.static booleanstatic booleanisListOrCollection(Class<?> clazz) booleanisMethodNameValid(String methodName) static booleanbooleanisSpringDataDefaultMethod(String methodName) static booleanstatic booleanstatic com.fasterxml.jackson.databind.JsonNode
-
Field Details
-
R2DBC_QUERY_MANIPULATION
- See Also:
-
MONGO_QUERY_MANIPULATION
- See Also:
-
TRANSFORMATIONS
- See Also:
-
CONDITIONS
- See Also:
-
SELECTION
- See Also:
-
WHITELIST
- See Also:
-
BLACKLIST
- See Also:
-
COLUMNS
- See Also:
-
ALIAS
- See Also:
-
TYPE
- See Also:
-
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
isMethodNameValid
-
isSpringDataDefaultMethod
-
isFlux
-
isMono
-
isListOrCollection
-
isString
-
isString
-
readTree
-
convertReturnTypeIfNecessary
public static <T> Object convertReturnTypeIfNecessary(reactor.core.publisher.Flux<T> databaseObjects, Class<?> returnClassOfMethod) To avoid duplicate code and for simplicity, fluxes were used in all EnforcementPoints, even if the database method expects a mono. Therefore, at this point it must be checked here what the return type is and transformed accordingly. In addition, the case that a non-reactive type, such as a list or collection, is expected is also covered.- Parameters:
databaseObjects- are the already manipulated objects, which are queried with the manipulated query.returnClassOfMethod- is the type which the database method expects as return type.- Returns:
- the manipulated objects transformed to the correct type accordingly.
-